MyXoops Forum

Forum - myXOOPS German Support

4 - 3 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Tabele 3 Spaltig bekommen

Betreff: Tabele 3 Spaltig bekommen
von butzemanya am 09.12.2004 00:51:56

Hi ich will ein modul bauen und bekomme ein fach nicht gebacken eine tabele 3 spaltig darzustellen,es handelt sich hierbei um ein nuke modul was ich ein wenig anpassen möchte.
Diese tabelle soll 3 mal ausgegeben werden und dan ein breack machen.
echo '<table width="100%" border="0"><tr><td height="155">'
  echo 
make_linked_image(get_view_detail_link($template["id"]),$template["medium_screenshot"]); 
  echo 
'</td><td>'
  echo 
'<b>Template Number:</b> ' $template["id"] . '<br />'
  echo 
'<b>Price:</b> $' $template["price"] . '<br />'
  echo 
'<b>Exclusive price:</b> $' $template["exclusive_price"].'<br />'
  echo 
'<b>Creation Date:</b> ' $template["date"] . '<br />'
  echo 
'<b>Number of downloads:</b> ' $template["number_of_downloads"] . '<br />'
 
$author $template["authors_id"];
  echo 
'<b>Author:</b> ';
 echo 
'<a href="'.get_author_page_link(0,$author).'">'$authors[$author] . '<br /></a>'
 echo 
'</td></tr></table>';


der ganze code der seite schaut so aus
<?php



function show_search_by_author_dropdown() {
  global  
$authors;
 global  
$max_author;

  echo 
"<SELECT NAME="author"n style="WIDTH125px">n";
 for(
$i=0;$i<=$max_author;$i++) {
    if(
strlen($authors[$i])>0) {
        echo 
"<option Value="$i">".$authors[$i]."</option>";
    }
 } 
  echo 
"    </SELECT>n";
}

function 
show_search_by_categories_dropdown() {
  global  
$categories;
  global  
$max_category;
  global  
$show_adult;
  
  echo 
"<SELECT NAME="category_number"n style="WIDTH125px">n";
  for(
$i=0;$i<=$max_category;$i++) {
    if(
strlen($categories[$i])>0) {
     if(
strstr($categories[$i],'Adult') && ($show_adult!=1))
     {
       continue;
     }
       echo 
"<option Value="$i">".$categories[$i]."</option>";
   }
 } 
  echo 
"    </SELECT>n";
}

function 
show_screenshot($item_number) {
 
// check item_number value, exit script if not found. 
 //  $item_number = "0";
   
if(!$item_number) { 
      exit(
'No item number!'); 
   } 

   
// please note, you must have protocol wrappers enabled for this to work... 
   
$link = @fopen('http://www.templatemonster.com/webapi/templates_screenshots2.php?from=' $item_number '&to=' $item_number '&filter=1&delim=|''r'
      or exit(
'Could not open remote file!'); 
    
   while(!
feof($link)) { // while we're still not at the end of the file... 
       
$readfile .= fread($link1024); // read the file into the $readfile variable, 1024 bytes (1KB) per time 
   

    
   
// create an array from the $readfile variable 
   
$template_array explode('|'$readfile); 
 
   
// create a display 
   
$template_display '<img src="' $template_array[13] . '"> <br />'
   
$template_display .= '<b>Price:</b> $' $template_array[1] . '<br />'
   
$template_display .= '<b>Exclusive price:</b> $' $template_array[2] . '<br />'
   
// display it 
   
echo $template_display;    
}

function 
display_template_details_from_associative_array($template){
         echo 
$template["id"]."<br>";
          echo 
$template["price"]."<br>";
         echo 
$template["exclusive_price"]."<br>";
         echo 
$template["date"]."<br>";
          echo 
$template["number_of_downloads"]."<br>";
         echo 
$template["is_hosting"]."<br>";
          echo 
$template["is_flash"]."<br>";
          echo 
$template["is_adult"]."<br>";
          echo 
$template["is_unique_logo"]."<br>";
          echo 
$template["is_non_unique_logo"]."<br>";
          echo 
$template["authors_id"]."<br>";
          echo 
$template["is_full_site"]."<br>";
          echo 
$template["number_of_pages"]."<br>";
         echo 
$template["medium_screenshot"]."<br>";
         echo 
$template["big_screenshot"]."<br>";
          echo 
$template["HTML_big_screenshot"]."<br>";
         echo 
$template["PSD_actual_size_screenshot"]."<br>";
          echo 
$template["subpage_HTML_screenshot"]."<br>";
         echo 
$template["HTML_page_for_flash"]."<br>";
         echo 
$template["flash_template_SWF"]."<br>";
          echo 
$template["flash_header_HTML"]."<br>";
         echo 
$template["flash_intro_SWF"]."<br>";
         echo 
$template["flash_intro_screenshot"]."<br>";
          echo 
$template["flash_header_SWF"]."<br>";
          echo 
$template["flash_header_HTML_for_SWF"]."<br>";
         echo 
$template["flash_header_screenshot"]."<br>";
}

function 
display_single_template_brief($item_number
{
    
$template get_single_template_data($item_number); //retrieve the template
   
display_template_brief_from_associative_array($template);
}

function 
display_template_brief_from_associative_array($template){
  global  
$authors;
 global 
$show_adult;
 if((
$template["is_adult"] == 1) && ($show_adult!=1)) {
    echo 
"This template contains adult material and has been disabled on this web site<br>";
    return;
 }
 echo 
'<table width="100%" border="0"><tr><td height="155">'
 echo 
make_linked_image(get_view_detail_link($template["id"]),$template["medium_screenshot"]); 
  echo 
'</td><td>'
  echo 
'<b>Template Number:</b> ' $template["id"] . '<br />'
  echo 
'<b>Price:</b> $' $template["price"] . '<br />'
  echo 
'<b>Exclusive price:</b> $' $template["exclusive_price"].'<br />'
  echo 
'<b>Creation Date:</b> ' $template["date"] . '<br />'
  echo 
'<b>Number of downloads:</b> ' $template["number_of_downloads"] . '<br />'
 
$author $template["authors_id"];
  echo 
'<b>Author:</b> ';
 echo 
'<a href="'.get_author_page_link(0,$author).'">'$authors[$author] . '<br /></a>'
 echo 
'</td></tr></table>'
/*
 echo $template["is_hosting"]."<br>"; echo $template["is_flash"]."<br>"; 
  echo $template["is_adult"]."<br>"; 
 echo $template["is_unique_logo"]."<br>"; 
 echo $template["is_non_unique_logo"]."<br>"; 
 echo $template["authors_id"]."<br>"; 
 echo $template["is_full_site"]."<br>"; 
 echo $template["number_of_pages"]."<br>";
    echo $template["big_screenshot"]."<br>"; 
  echo $template["HTML_big_screenshot"]."<br>"; 
  echo $template["PSD_actual_size_screenshot"]."<br>"; 
 echo $template["subpage_HTML_screenshot"]."<br>"; 
  echo $template["HTML_page_for_flash"]."<br>"; 
  echo $template["flash_template_SWF"]."<br>"; 
 echo $template["flash_header_HTML"]."<br>"; 
  echo $template["flash_intro_SWF"]."<br>"; 
  echo $template["flash_intro_screenshot"]."<br>"; 
 echo $template["flash_header_SWF"]."<br>"; 
 echo $template["flash_header_HTML_for_SWF"]."<br>"; 
  echo $template["flash_header_screenshot"]."<br>";*/ 


function 
display_featured_flash_templates(){ 
 
$tlist get_featured_templates("flash"); 
  echo 
"There are ".count($tlist)." featured templates<br>"

 for(
$i=0;$i<count($tlist);$i++) {
   
sscanf($tlist[$i],"%d",&$temp); //get the integer bit only
    
$currentTemplate sprintf("%d",$temp); //put it back out to a string
   
$templates get_single_template_data($currentTemplate); //retrieve the template
    
display_template_details_from_associative_array($templates);
  }
}

function 
display_featured_flash_template_briefs()
{
  
$tlist get_featured_templates("flash");   
  for(
$i=0;$i<count($tlist);$i++) {
   
sscanf($tlist[$i],"%d",&$temp); //get the integer bit only
    
$currentTemplate sprintf("%d",$temp); //put it back out to a string
//   echo "Showing template ".$currentTemplate."<br>";
   
display_single_template_brief($currentTemplate);
  }
}

function 
display_featured_website_template_briefs()
{
  
$tlist get_featured_templates("website"); 

  for(
$i=0;$i<count($tlist);$i++) {
   
sscanf($tlist[$i],"%d",&$temp); //get the integer bit only
    
$currentTemplate sprintf("%d",$temp); //put it back out to a string
//   echo "Showing template ".$currentTemplate."<br>";
   
display_single_template_brief($currentTemplate);
  }
}

function 
display_featured_website_templates(){
  
$tlist get_featured_templates("website");

 for(
$i=0;$i<count($tlist);$i++) {
   
sscanf($tlist[$i],"%d",&$temp); //get the integer bit only
    
$currentTemplate sprintf("%d",$temp); //put it back out to a string
   
$templates get_single_template_data($currentTemplate); //retrieve the template
    
display_template_details_from_associative_array($templates);
  }
}

function 
make_linked_image($link,$image)
{
 return 
'<a href="'.$link.'"><img src="'.$image.'"></img></a>'
}

function 
display_detailed_template($item_number)
{
 global  
$authors;
 global  
$categories;
  global 
$AffiliateName;
  global 
$show_adult;
 
  
$template get_single_template_data($item_number);
 
  if((
$template["is_adult"] == 1) && ($show_adult!=1)) {
    echo 
"This template contains adult material and has been disabled on this web site<br>";
    return;
 } 
  
  echo 
'<h3>Template Number ' $template["id"] . '</h3><br />'
 if(
$template["is_flash"]) {
 
$indir $template["id"] - ($template["id"]%100);
 
  echo 
"<a style='cursor: hand' onclick='window.open("http://www.template-help.com/screenshots/".$indir."/".$template["id"].".html","flash" ,"location=yes,width="+screen.width+",height="+screen.height);'>n";
 //echo "<a style='cursor: hand' onclick='window.open("".$template["flash_header_SWF"]."","flash" ,"location=yes,width="+screen.width+",height="+screen.height);'>n";
  
}
 echo 
'<img src="'.$template["big_screenshot"].'"></img><br />'
  if(
$template["is_flash"]) {
   echo 
'</a>';
  }
 echo 
'<b>Price:</b> $' $template["price"] . '<br />'
  echo 
'<b>Exclusive price:</b> $' $template["exclusive_price"].'<br />'
  echo 
'<b>Creation Date:</b> ' $template["date"] . '<br />'
  echo 
'<b>Number of downloads:</b> ' $template["number_of_downloads"] . '<br />'
// echo '<b>Pages included:</b> ' . $template["number_of_pages"] . '<br />'; 
  
echo '<b>Full Site:</b> ' . (($template["is_full_site"]==1)?"Yes":"No") . '<br />'
  echo 
'<b>Includes Flash:</b> ' . (($template["is_flash"]==1)?"Yes":"No") . '<br />'

 echo 
'<b>Author:</b> ';
 
$author $template["authors_id"];
  echo 
'<a href="'.get_author_page_link(0,$author).'">'$authors[$author+1] . '<br /></a>'

   
  
//Display this templates categories
 
$allCategories $categories;
 
//echo "There are ".count($allCategories)." total categories<br>";
  
$categoriesForTemplate get_template_category($item_number,$item_number);
  
//echo "There are ".(count($categoriesForTemplate)/2)." categories for this template<br>";
  
echo '<b>Categories: </b>'

  for(
$i=0;$i<(count($categoriesForTemplate)/2);$i+=2) { //For each category
    
$thisCategoryID $categoriesForTemplate[$i+1];
   
sscanf($thisCategoryID,"%d",&$thisCategoryIDInt);//convert to int
   
$thisCategoryName $allCategories[$thisCategoryIDInt];
       echo 
'<a href="'.get_view_category_link($thisCategoryID).'">'.
               
$thisCategoryName.
              
'</a>,';
 } 
  
  echo 
"<br><br>";

  
//Show the buy button
 
echo "<a  style='cursor: hand' onclick="window.open('http://www.mytemplatestorage.com/email.php?aff=".$AffiliateName."&skin=17&templ=".$template["id"]."&level=0&locale=en','buy".$template["id"]."','scrollbars=yes')" >n";
  echo 
'<img src="'.get_this_path().'/images/buy.gif"></img>';
  echo 
"</a>n";

 echo 
"<br><br>";
  
  
  
display_image_if_not_false($template["PSD_actual_size_screenshot"],"Photoshop Actual Size Screenshot");
 
display_image_if_not_false($template["flash_header_screenshot"],"Flash Header Screenshot");
 
display_flash_if_not_false($template["flash_header_HTML_for_SWF"],"Flash Header");
  
display_image_if_not_false($template["flash_intro_screenshot"],"Flash Intro Screenshot");
 
display_flash_if_not_false($template["flash_header_HTML"],"Flash Header");
  
display_image_if_not_false($template["HTML_page_for_flash"],"HTML page for flash");
 
display_flash_if_not_false($template["flash_template_SWF"],"Flash Template");
 
display_flash_if_not_false($template["flash_header_SWF"],"Flash Header");
 
display_flash_if_not_false($template["flash_intro_SWF"],"Flash Intro"); 
  
display_image_if_not_false($template["subpage_HTML_screenshot"],"Subpage HTML Screenshot");
 
//display_image_if_not_false($template["big_screenshot"],"Big Screenshot"); //Removed cos it's always same as main sc
//  echo "<center>";
/*
  echo $template["is_hosting"]."<br>"; 
 echo $template["is_unique_logo"]."<br>"; 
 echo $template["is_non_unique_logo"]."<br>"; 
 echo $template["authors_id"]."<br>"; 
 echo $template["is_full_site"]."<br>"; 
    echo $template["big_screenshot"]."<br>"; */
}

function 
display_image_if_not_false($link,$text){
  if(
$link!="false") {
    echo 
"<font class="option">".$text."</font><br><br>";
   echo 
'<img src="'.$link.'"></img><br>';
 }
}

function 
display_html_if_not_false($link,$text) {
 if(
$link!="false") {
    echo 
"<font class="option">".$text."</font><br><br>";
   echo 
'<img src="'.$link.'"></img><br>';
 }
}
function 
display_flash_if_not_false($link,$text) {
  if(
$link!="false") {
    echo 
"<font class="option">".$text."</font><br><br>";
/*   echo "<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">n";
   echo "  <param name="movie" value="".$link."">n";
   echo "  <param name="quality" value="high">n";
    echo "  <embed src="".$link."<" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="32" height="32"></embed></object><br>n";
*/
   
echo "<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="697" height="182">n";
   
echo "  <param name="movie" value="".$link."">n";
   echo 
"  <param name="quality" value="high">n";
    echo 
"  <param name="menu" value="false">n";
    echo 
"  <embed src="".$link."" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="697" height="182"></embed></object>n";
    
  
}
}

function 
display_category_search() {
  global 
$module_name;

  echo 
"<form action="".get_main_page()."" method="get" name="category_search" target="_top">n";
  echo 
'<input name="name" type="hidden" value="'.$module_name.'">';
  echo 
"<table><tr><td> Search by Category</td><td>"
  
show_search_by_categories_dropdown();
 echo 
"</td><td>";
 echo 
"  <input type="submit" value="Search">n";
 echo 
"</td></tr></table>";
  echo 
' <input name="action" type="hidden" value="showcategory">';
 echo 
' <input name="page" type="hidden" value="0">';
  echo 
"</form>n";
}

function 
display_category($category,$page)
{
  global 
$items_per_page;
 global  
$categories;
  global 
$linesperentry;

  
$wholeCategory get_single_category_data($category);
 
  
$numTemplates = (int)(count($wholeCategory)/27);
  
$numPages = (int)($numTemplates/$items_per_page);

 if(
$page>=$numPages) {
    
$showPage=$numPages 2;
  }else{
    
$showPage=$page;
  }
 
$FirstTemplateOnPage $showPage*$items_per_page;
 
$LastTemplateOnPage $FirstTemplateOnPage $items_per_page;
 echo 
'<br><font class="option">Category: '.$categories[$category].'<font class="option"><br><br>';

  
/**
   We need to make sense of all of the data that comes back from the category list first
 */
//  echo count($wholeCategory);
 //if this page is greater than the last page
  //Display a brief of each template
  
for($i=($FirstTemplateOnPage*$linesperentry);$i<($LastTemplateOnPage*$linesperentry);$i+=$linesperentry) { //templates use 26 fields
    
if(($LastTemplateOnPage*$linesperentry) < count($wholeCategory) ){
      for(
$j=0;$j<$linesperentry-1;$j++) { 
       
$temp_array[$j] = $wholeCategory[$i+$j];
  
//      echo "Number ".$j." is:".$temp_array[$j]."<br>";
      
}
     
$decoded_array decode_template($temp_array);
      
display_template_brief_from_associative_array($decoded_array);
    }
 }
 
$next_page $showPage+1;
 echo 
"<br><br><strong>";
  
  echo 
'<table width=100%><tr><td align="left" width=25%>';
 if(
$showPage 0) {
   echo 
'<a href="'.get_category_page_link($showPage-1,$category).'">Previous <<<</a>';
  }
 echo 
'</td><td width=75% align="center">';
  
//Display links to each page
  

  
if($numPages 8) {
   
$startLinks $showPage 4;
    if(
$startLinks <0)
      
$startLinks 0;
    
$endLinks $startLinks 8;
  }else {
   
$startLinks 0;
    
$endLinks $numPages;
  }
 
  for(
$i=$startLinks;$i<$endLinks;$i++){
    if((
$i!=$startLinks)&&($i<($endLinks))) { //put a comma between them
      
echo",";
    }
   if(
$i!=$showPage) {
     echo 
'<a href="'.get_category_page_link($i,$category).'">'.$i.'</a>';
   }
   else{
     echo 
$i//don't make it a link if it is this page
   
}
 }

 echo 
'</td><td width=100% align="right">';  
  if(
$next_page $numPages){
   echo 
'<a href="'.get_category_page_link($showPage+1,$category).'"> Next >>></a>';
 }
 echo 
"</td>";
 echo 
"</tr></table></strong>";
  
}




function 
display_author_search() {
 global 
$module_name;
  echo 
"<form action="".get_main_page()."" method="get" name="category_search" target="_top">n";
  echo 
' <input name="name" type="hidden" value="'.$module_name.'">';
 echo 
"<table><tr><td> Search by Author</td><td>"
  
show_search_by_author_dropdown();
 echo 
"</td><td>";
 echo 
"  <input type="submit" value="Search">n";
 echo 
"</td></tr></table>";
  echo 
' <input name="action" type="hidden" value="showauthor">';
 echo 
' <input name="page" type="hidden" value="0">';
  echo 
"</form>n";
}


function 
display_author($author,$page)
{
  global 
$items_per_page;
 global  
$authors;
 
//  echo "author is ".$author."<br>";
// echo "page is ".$page."<br>";
   
  
$allTemplates get_templates_by_author($author);
 
  
$numTemplates = (int)(count($allTemplates));
//  echo "numTemplates is ".$numTemplates."<br>";
 
$numPages ceil($numTemplates/$items_per_page);
//  echo "items_per_page is ".$items_per_page."<br>";
// echo "numPages is ".$numPages."<br>";

 
if($page>=$numPages) {
    
$showPage=$numPages-1;
  }else{
    
$showPage=$page;
  }
 
$FirstTemplateOnPage $showPage*$items_per_page;
 
$LastTemplateOnPage $FirstTemplateOnPage $items_per_page;
// echo "FirstTemplateOnPage is ".$FirstTemplateOnPage."<br>";
// echo "LastTemplateOnPage is ".$LastTemplateOnPage."<br>";
 
  
echo '<br><font class="option">Templates by '.$authors[$author].'</font><br><br>';
  
  
//We need to make sense of all of the data that comes back from the category list first
 

  //if this page is greater than the last page
  //Display a brief of each template
  
for($i=$FirstTemplateOnPage;$i<$LastTemplateOnPage;$i++) { //templates use 26 fields
    
if($i $numTemplates ){
      
display_template_brief_from_associative_array($allTemplates[$i]);
   }
 }
 
$next_page $showPage+1;
 echo 
"<br><br><strong>";
  
  echo 
'<table width=100%><tr><td align="left" width=25%>';
 if(
$showPage 0) {
   echo 
'<a href="'.get_author_page_link($showPage-1,$author).'">Previous <<<</a>';
  }
 echo 
'</td><td width=75% align="center">';
  
//Display links to each page

  
if($numPages 8) {
   
$startLinks $showPage 4;
    if(
$startLinks <0)
      
$startLinks 0;
    
$endLinks $startLinks 8;
  }else {
   
$startLinks 0;
    
$endLinks $numPages;
  }
 
  for(
$i=$startLinks;$i<$endLinks;$i++){
    if((
$i!=0)&&($i<($numPages))) { //put a comma between them
      
echo",";
    }
   if(
$i!=$showPage) {
     echo 
'<a href="'.get_author_page_link($i,$author).'">'.$i.'</a>';
   }
   else{
     echo 
$i//don't make it a link if it is this page
   
}
 }

 echo 
'</td><td width=100% align="right">';  
  if(
$next_page $numPages){
   echo 
'<a href="'.get_author_page_link($showPage+1,$author).'"> Next >>></a>';
 }
 echo 
"</td>";
 echo 
"</tr></table></strong>";
  
}


function 
display_keyword_search() {
  global 
$module_name;
  echo 
"<form action="".get_main_page()."" method="get" name="keyword_search" target="_top">n";
 echo 
' <input name="name" type="hidden" value="'.$module_name.'">';
 echo 
"<table><tr><td> Search by Keyword</td><td>";  
  echo 
'<input type="text" name="keyword">';
  echo 
"</td><td>";
 echo 
"  <input type="submit" value="Search">n";
 echo 
"</td></tr></table>";
  echo 
' <input name="action" type="hidden" value="keyword">';
  echo 
' <input name="page" type="hidden" value="0">';
  echo 
"</form>n";
}

function 
display_search($keyword,$page) {
  
$matches get_keyword_search($keyword,$page);
  
  global 
$items_per_page;
 
//  echo "author is ".$author."<br>";
// echo "page is ".$page."<br>";
   
  
$numTemplates count($matches);
  
  if(
$numTemplates <= 0) {
    echo 
'<br><br><br><font class="option">No templates matched keywords: <br>'.$keyword.'</font><br>';
   return;
 }
// echo "numTemplates is ".$numTemplates."<br>";
 
$numPages ceil($numTemplates/$items_per_page);
//  echo "items_per_page is ".$items_per_page."<br>";
// echo "numPages is ".$numPages."<br>";

 
if($page>=$numPages) {
    
$showPage=$numPages-1;
  }else{
    
$showPage=$page;
  }
 
$FirstTemplateOnPage $showPage*$items_per_page;
 
$LastTemplateOnPage $FirstTemplateOnPage $items_per_page;
// echo "FirstTemplateOnPage is ".$FirstTemplateOnPage."<br>";
// echo "LastTemplateOnPage is ".$LastTemplateOnPage."<br>";
 
  
echo '<br><br><font class="option">Results of Keyword Search: '.$keyword.'</font><br><br>';
 echo 
'Page '.$showPage.' of '.$numPages.'<br>';
 
//We need to make sense of all of the data that comes back from the category list first
   
//  echo "Matches = ".count($matches)."<br>";
 
  
for($i=$FirstTemplateOnPage;$i<$LastTemplateOnPage;$i++) { 
//   echo "Fetching template ".$matches[$i]."<br>";
    
$template get_single_template_data($matches[$i]);
   
display_template_brief_from_associative_array($template);
 }
 
$next_page $showPage+1;
 echo 
"<br><br><strong>";
  
  echo 
'<table width=100%><tr><td align="left" width=25%>';
 if(
$showPage 0) {
   echo 
'<a href="'.get_search_page_link($showPage-1,$keyword).'">Previous <<<</a>';
 }
 echo 
'</td><td width=75% align="center">';
  
//Display links to each page

  
if($numPages 8) {
   
$startLinks $showPage 4;
    if(
$startLinks <0)
      
$startLinks 0;
    
$endLinks $startLinks 8;
  }else {
   
$startLinks 0;
    
$endLinks $numPages;
  }
 
  for(
$i=$startLinks;$i<$endLinks;$i++){
    if((
$i!=0)&&($i<($numPages))) { //put a comma between them
      
echo",";
    }
   if(
$i!=$showPage) {
     echo 
'<a href="'.get_search_page_link($i,$keyword).'">'.$i.'</a>';
    }
   else{
     echo 
$i//don't make it a link if it is this page
   
}
 }

 echo 
'</td><td width=100% align="right">';  
  if(
$next_page $numPages){
   echo 
'<a href="'.get_search_page_link($showPage+1,$keyword).'"> Next >>></a>';
  }
 echo 
"</td>";
 echo 
"</tr></table></strong>";
  
}

function 
display_menu() {
  echo 
'<div align="right">';
 echo 
'<strong><a href="'.get_main_page().'&action=search">Search Templates</a>                       ';
 echo 
' <a href="'.get_main_page().'">Templates Main Page</a>        ';
  echo 
' <a href="'.get_main_page().'&action=affiliate">  Join our Affiliate Program</a>';
  echo 
'</strong></div>';
}

function 
display_search_boxes() {
   echo 
'<div align="center"><font class="option">High Quality Website Templates</font></div><br>';
    
display_category_search();
    
display_keyword_search();
   
display_author_search();
    
display_template_specify();
}

function 
display_template_specify() {
 global 
$module_name;
  
  echo 
"<form action="".get_main_page()."" method="get" name="showdetail" target="_top">n";
 echo 
' <input name="name" type="hidden" value="'.$module_name.'">';
 echo 
' <input name="action" type="hidden" value="showdetail">';
 echo 
"<table><tr><td> Go directly to template number</td><td>"
  echo 
'<input type="text" name="item_number">';
  echo 
"</td><td>";
 echo 
"  <input type="submit" value="Go">n";
 echo 
"</td></tr></table>";
  echo 
"</form>n";
}

function 
display_affiliate()
{
  echo 
'<br><br><div align="center"><font class="option">Affiliate Program</font></div><br>';
 echo 
'<p>Our affiliate program is an excellent way to sell professional design templates online. We provide you with an easy way to sell professional services through your own website, under your own name, all with the click of a few buttons. You can choose to receive notifications on each sale, a weekly sales report and even control the content in the download email...best of all, it's completely FREE to join!<p>';
  //echo '
<p>For PHP-Nuke users we also supply a freely downloadable module which you can integrate into your website to begin selling templates within minutesTo download the module click <a href="http://www.outoftheratrace.co.uk/getlatest.php">here</a>.</p>';
  echo '
<p>Every template that you sell will earn you <strong>20commission</strong>.</p>';

  echo '
First fill out this form to register with the affiliate program.';  
  echo '
<form action="http://www.mytemplatestorage.com/join.php" method="post">';
 echo '
<input type="hidden" name="action" value="reg">';
 echo '
<table>';
 echo '
<tbody>';
 echo '
<tr>';
  echo '
<td>FIRST NAME</td>';
 echo '
<td><input type="text"  name="fname" value=""></td>';
 echo '
</tr>';
 echo '
<tr>';
  echo '
<td>LAST NAME</td>';
  echo '
<td><input type="text"  name="lname" value=""></td>';
 echo '
</tr>';
 echo '
<tr>';
  echo '
<td>WEBSITE URL</td>';
  echo '
<td><input type="text"  name="url" value=""></td>';
 echo '
</tr>';
 echo '
<tr>';
  echo '
<td>REGULAR E-MAIL ADDRESS</td>';
 echo '
<td><input type="text" name="email" value=""></td>';
  echo '
</tr>';
 echo '
<tr>';
  echo '
<td>PAYPAL E-MAIL ADDRESS</td>';
  echo '
<td><input type="text" name="paypal_email" value=""></td>';
 echo '
</tr>';
 echo '
<tr>';
  echo '
<td>PHONE</td>';
  echo '
<td><input type="text" name="phone" value=""></td>';
  echo '
</tr>';
 echo ' 
<tr><td><br><br></td></tr>';
 echo '
<tr>';
  echo '
<td>DESIRED USERNAME</td>';
 echo '
<td><input type="text" name="login"></td>';
 echo '
</tr>';
 echo '
<tr>';
  echo '
<td>PASSWORD</td>';
 echo '
<td><input type="password" name="passwd"></td>';
  echo '
</tr>';
 echo '
<tr>';
  echo '
<td>CONFIRM PASSWORD</td>';
 echo '
<td><input type="password" name="passwd2"></td>';
 echo '
</tr>';
 echo '
<tr>';
  echo '
<td colspan="2" align="right"><input type="submit" value="Continue"></td></tr>';
  echo '
</tbody></table>';
  echo '
<input type="hidden" name="affiliate" value="'.$AffiliateName.'" >';
  echo '
</form>';
}

?>


Kann mir vielleicht jemand das script verbessern ?

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
Modulentwicklung New Xoops Xcreate Module 0 5337 26.11.2025 15:22
efkan Gehe zum letzten Beitrag
Modulentwicklung XOOPS Custom Field Module 1 1825 24.11.2025 11:21
Goffy Gehe zum letzten Beitrag