You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 48 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - *EDITED: Adding field problem [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
zao
Nuke Soldier
Nuke Soldier


Joined: Apr 16, 2004
Posts: 26


PostPosted: Thu May 05, 2005 7:57 am Reply with quoteBack to top

*EDITED: This post originally contained a reward of free advertising to those who helped. This post is now outdated, so the title stating reward has been edited. One person offered decent help, they were offered advertising for their help. This is now closed.
--------
Ok, here's what's up. My Reviews module has been super modified to be a band database. All of the fields and such were mostly the same until recently.

I went into my phpmyadmin database, and in the _reviews, added one field called: question1
The type is text, same as the original field titled: text (for content of review).

I manually entered into my first band(review) questionone field: "This is a test."

I copied and went thru over and over the modules/Reviews/index.php file, adding the $questionone to everything..

Here's the problem. When I am logged in as admin, and edit the first band(review), all of the fields show up, including my $questionone, and in the box it shows my manually added info: "This is a test."

When I edit the field for $questionone, and do a preview, it shows up as changed. It acts as if everything is working fine.

However, when I submit the modifications, they never change the database for only $questionone.

Is there one simple thing I am missing out on?

Here is my modified modules/Reviews/index.php file:

Code:

<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* =====================                                                */
/* Base on Reviews Addon                                                */
/* Copyright (c) 2000 by Jeff Lambert (jeffx@ican.net)                  */
/* http://www.qchc.com                                                  */
/* More scripts on http://www.jeffx.qchc.com                            */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);


function news($id) {
  global $prefix, $multilingual, $currentlang, $db, $tipath, $user, $cookie;

$topic = "$id";
$sql = "SELECT topictext FROM ".$prefix."_topics WHERE topicid='$topic'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$topictext = $row[topictext];
$sql = "SELECT sid, title, counter FROM ".$prefix."_stories WHERE topic='$topic' $querylang ORDER BY sid DESC LIMIT 0,3";
$result = $db->sql_query($sql);
  while ($row = $db->sql_fetchrow($result)) {
$counter = $row[counter];
 echo" <strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=News&amp;file=article&amp;sid=$row[sid]$r_options\">$row[title] ($counter)</a><br>";
}
}


function talentfilelinks($id) {
  global $prefix, $multilingual, $currentlang, $db, $tipath, $user, $cookie;

  echo "<b>Newest Talent Files:</b><br>\n";

   $sql = "SELECT id, title, hits FROM ".$prefix."_reviews ORDER BY id DESC LIMIT 0,10";
$result = $db->sql_query($sql);
        while ($row = $db->sql_fetchrow($result)) {
   $id = $row[id];
   $title = $row[title];
      $hits = $row[hits];
            echo "<img src=\"images/tri.gif\">&nbsp;<a href=\"reviews.html&amp;rop=showcontent&amp;id=$id\">$title</a><br>\n";

         }

     echo "<br><br><b>Most Popular:</b><br>\n";

     $sql = "SELECT id, title, hits FROM ".$prefix."_reviews ORDER BY hits DESC LIMIT 0,10";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$hits = $row[hits];
  echo "<img src=\"images/tri.gif\">&nbsp;<a href=\"reviews.html&amp;rop=showcontent&amp;id=$row[id]\">$row[title]</a><br>";
}   
}


function display_score($score) {
    $metal = "<img src=\"images/metal.gif\" alt=\"\">";
        $rock = "<img src=\"images/rock.gif\" alt=\"\">";
            $hxc = "<img src=\"images/hxc.gif\" alt=\"\">";
             $punk = "<img src=\"images/punk.gif\" alt=\"\">";
    $worship = "<img src=\"images/worship.gif\" alt=\"\">";
    $industrial = "<img src=\"images/industrial.gif\" alt=\"\">";
    $experimental = "<img src=\"images/experimental.gif\" alt=\"\">";
    $emo = "<img src=\"images/emo.gif\" alt=\"\">";
    $ska = "<img src=\"images/ska.gif\" alt=\"\">";
    $other = "<img src=\"images/other.gif\" alt=\"\">";

    if ($score == 10) {
   for ($i=0; $i < 1; $i++)
       echo "$other";
    } if ($score == 9) {
   for ($i=0; $i < 1; $i++)
       echo "$ska";
          } if ($score == 8) {
   for ($i=0; $i < 1; $i++)
       echo "$emo";
                 } if ($score == 7) {
   for ($i=0; $i < 1; $i++)
       echo "$experimental";
                 } if ($score == 6) {
   for ($i=0; $i < 1; $i++)
       echo "$industrial";
                 } if ($score == 5) {
   for ($i=0; $i < 1; $i++)
       echo "$worship";
        } if ($score == 4) {
   for ($i=0; $i < 1; $i++)
       echo "$punk";
          } if ($score == 3) {
   for ($i=0; $i < 1; $i++)
       echo "$hxc";
                 } if ($score == 2) {
   for ($i=0; $i < 1; $i++)
       echo "$metal";
                 } if ($score == 1) {
   for ($i=0; $i < 1; $i++)
       echo "$rock";

    }
}

function write_review() {
    global $admin, $sitename, $user, $cookie, $prefix, $user_prefix, $currentlang, $multilingual, $dbi, $db, $module_name;
    include ('header.php');
    OpenTable();
echo "<b><span style=\"font-size: 20pt\">UNDER CONSTRUCTION. WE ARE CURRENTLY NOT ACCEPTING NEW BANDS. CHECK BACK IN A FEW DAYS. THANKS.</span><p>

    <b>ADD A BAND:</b><br><i>Input the band info into the following form:</i><p>

    <form method=\"post\" action=\"modules.php?name=$module_name\">


    <b>BAND NAME:</b><br>
    <input type=\"text\" name=\"title\" size=\"50\" maxlength=\"150\"><br>

       <b>BAND GENRE:</b><br>
    <select name=\"score\">
    <option name=\"score\" value=\"1\">Rock</option>
    <option name=\"score\" value=\"2\">Metal</option>
    <option name=\"score\" value=\"3\">HxC</option>
    <option name=\"score\" value=\"4\">Punk</option>
    <option name=\"score\" value=\"5\">Worship</option>
    <option name=\"score\" value=\"6\">Industrial</option>
    <option name=\"score\" value=\"7\">Experimental</option>
    <option name=\"score\" value=\"8\">Emo</option>
    <option name=\"score\" value=\"9\">Ska</option>
    <option name=\"score\" value=\"10\">Other?</option>
    </select><br>"


."<b>BAND BIO:</b><br>
    <textarea name=\"text\" rows=\"10\" wrap=\"virtual\" cols=\"65\"></textarea><br><br>"



."<b>YOUR NAME:</b><br>"
  ."<input type=\"text\" name=\"reviewer\" size=\"41\" maxlength=\"40\" value=\"$name\"><br><br>


        <b>YOUR EMAIL:</b><br>
    <input type=\"text\" name=\"email\" size=\"40\" maxlength=\"80\" value=\"$email\"><br><br>


    <b>BAND HOMEPAGE URL:</b><br>
    <input type=\"text\" name=\"url\" size=\"40\" maxlength=\"100\"><br>
    <i>The band's official site. http:// is required. You may leave this blank if the band doesnt have a page.</i><br><br>

    <b>LINK TITLE:</b><br>
    <input type=\"text\" name=\"url_title\" size=\"40\" maxlength=\"50\"><br>
    <i>A Link title is required if you add a link above.</i><br><br>

   <b>QUESTION TEST:</b><br>
   <textarea name=\"questionone\" rows=\"10\" wrap=\"virtual\" cols=\"65\"></textarea>";


    if(is_admin($admin)) {
   echo "<b>IMAGE FILENAME:</b><br>
   <input type=\"text\" name=\"cover\" size=\"40\" maxlength=\"100\"><br>
   <i>Welcome ADMIN - load your image into the folder images/talentfiles/ then type the file name above.</i><br><br>";
    }
    echo "<i>"._CHECKINFO."</i><br><br>";
    echo "<input type=\"hidden\" name=\"rop\" value=\"preview_review\">
    <input type=\"submit\" value=\""._PREVIEW."\"> <input type=\"button\" onClick=\"history.go(-1)\" value=\""._CANCEL."\"></form></center>";
    CloseTable();
    include ("footer.php");
}


function preview_review($date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $questionone, $hits, $id) {
    global $admin, $multilingual, $module_name;
    if (eregi("<!--pagebreak-->", $text)) {
   $text = ereg_replace("<!--pagebreak-->","&lt;!--pagebreak--&gt;",$text);
    }
    $title = stripslashes(check_html($title, "nohtml"));
    $text = stripslashes(check_html($text, ""));
        $reviewer = stripslashes(check_html($reviewer, "nohtml"));
    $url_title = stripslashes(check_html($url_title, "nohtml"));
    include ('header.php');
    OpenTable();
    echo "<form method=\"post\" action=\"modules.php?name=$module_name\">";

    if ($title == "") {
       $error = 1;
   echo ""._INVALIDTITLE." Click Back.<br>";
    }
    if ($text == "") {
       $error = 1;
   echo ""._INVALIDTEXT." Click Back.<br>";
}
    if ($score == "") {
   $error = 1;
   echo "You need to choose the correct band Genre. Click back.<br>";
}
    if (($hits < 0) && ($id != 0)) {
   $error = 1;
   echo ""._INVALIDHITS." Click Back.<br>";
    }
    if ($reviewer == "" || $email == "") {
   $error = 1;
   echo ""._CHECKNAME." Click Back.<br>";
    } else if ($reviewer != "" && $email != "")
   if (!(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$",$email))) {
       $error = 1;
       /* eregi checks for a valid email! works nicely for me! */
       echo ""._INVALIDEMAIL." We need a VALID email! Click Back.<br>";
   }
   if (($url_title != "" && $url =="") || ($url_title == "" && $url != "")) {
       $error = 1;
       echo ""._INVALIDLINK." Click Back.<br>";
   } else if (($url != "") && (!(eregi('(^http[s]*:[/]+)(.*)', $url))))
       $url = "http://" . $url;
       /* If the user ommited the http, this nifty eregi will add it */
   if ($error == 1)
       echo "<br>"._GOBACK."";
   else
   {
   if ($date == "")
       $date = date("Y-m-d", time());
       $year2 = substr($date,0,4);
       $month = substr($date,5,2);
       $day = substr($date,8,2);
       $fdate = date("F jS Y",mktime (0,0,0,$month,$day,$year2));
           echo "<table border=\"0\" width=\"100%\"><tr><td colspan=\"2\">";
       echo "<p><font class=\"title\"><i><b>$title</b></i></font><br><br>";
   
      if ($cover != "")
          echo "<img src=\"images/talentfiles/$cover\" border=\"1\" vspace=\"2\" alt=\"\"><p>";
   
      echo "$text<br><br>";
          
            echo "<b>"._ADDED."</b> $fdate<br><br>";
         
      echo "<b>Added By:</b> <a href=\"mailto:$email\">$reviewer</a><br>";
   
      echo "<b>Band Genre:</b>";
       display_score($score);
   
      if ($url != "")
      echo "<br><b>Web Page:</b> <a href=\"$url\">$url_title</a><br><br>";
   
      if ($questionone != "")
      echo "<b>questionone:</b> $questionone<br><br>";

      if ($id != 0) {
      echo "<br><b>"._REVIEWID.":</b> $id<br>";
   
     echo "<b>"._HITS.":</b> $hits<br>";
       }
   

      echo "</td></tr></table>";
   
      $text = urlencode($text);
      
      echo "<p><i>Does the info above look correct? If so click Yes. Otherwise click your browser's back button and fix it.</i><p> ";
   
      echo "<input type=\"hidden\" name=\"id\" value=$id>
      
      <input type=\"hidden\" name=\"hits\" value=\"$hits\">
      
      <input type=\"hidden\" name=\"rop\" value=send_review>
      
      <input type=\"hidden\" name=\"date\" value=\"$date\">
      
      <input type=\"hidden\" name=\"title\" value=\"$title\">
      
           <input type=\"hidden\" name=\"text\" value=\"$text\">
      
      <input type=\"hidden\" name=\"reviewer\" value=\"$reviewer\">
      
      <input type=\"hidden\" name=\"email\" value=\"$email\">
      
      <input type=\"hidden\" name=\"score\" value=\"$score\">
      
      <input type=\"hidden\" name=\"url\" value=\"$url\">
      
      <input type=\"hidden\" name=\"url_title\" value=\"$url_title\">
      
          <input type=\"hidden\" name=\"questionone\" value=\"$questionone\">
      
      <input type=\"hidden\" name=\"cover\" value=\"$cover\">";
      
      echo "<input type=\"hidden\" name=\"rlanguage\" value=\"$rlanguage\">";
   
  echo "<input type=\"submit\" name=\"rop\" value=\""._YES."\">";
   
      if($id != 0)
          $word = ""._RMODIFIED."";
       else
          $word = ""._RADDED."";
       if(is_admin($admin))
          echo "<br><br><b>"._NOTE."</b> "._ADMINLOGGED." $word.";
   }
    CloseTable();
    include ("footer.php");
}


function send_review($date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $questionone, $hits, $id) {
    global $admin, $EditedMessage, $prefix, $dbi, $db, $module_name;
    include ('header.php');
    if (eregi("<!--pagebreak-->", $text)) {
   $text = ereg_replace("<!--pagebreak-->","&lt;!--pagebreak--&gt;;",$text);
    }
    $title = stripslashes(FixQuotes(check_html($title, "nohtml")));
    $text = stripslashes(Fixquotes(urldecode(check_html($text, ""))));
     if (eregi("&lt;!--pagebreak--&gt;", $text)) {
   $text = ereg_replace("&lt;!--pagebreak--&gt;","<!--pagebreak-->",$text);
    }
    OpenTable();
    echo "<br><center>Thanks for your submission.";
    if ($id != 0)
   echo " "._MODIFICATION."";
    else
   echo ", $reviewer";
    echo "!<br>";


    if ((is_admin($admin)) && ($id == 0)) {
   sql_query("INSERT INTO ".$prefix."_reviews VALUES (NULL, '$date', '$title', '$text', '$reviewer', '$email', '$score', '$cover', '$url', '$url_title', '$questionone', '1', '$rlanguage')", $dbi);
   echo "Thanks ADMIN.";
    } else if ((is_admin($admin)) && ($id != 0)) {
   sql_query("UPDATE ".$prefix."_reviews SET date='$date', title='$title', text='$text', reviewer='$reviewer', email='$email', score='$score', cover='$cover', url='$url', url_title='$url_title', 'questionone='$questionone', hits='$hits', rlanguage='$rlanguage' where id = $id", $dbi);
   echo "Thanks ADMIN.";
    } else {
   sql_query("INSERT INTO ".$prefix."_reviews_add VALUES (NULL, '$date', '$title', '$text', '$reviewer', '$email', '$score', '$url', '$url_title', '$questionone', '$rlanguage')", $dbi);
   echo "Your band info will be looked over and considered by an Admin.<br><br>MIHAVEN.COM reserves the right to edit,alter,add,deny graphics,info.";
    }
    echo "<br><br>[ <a href=\"modules.php?name=$module_name\">"._RBACK."</a> ]<br></center>";
    CloseTable();
    include ("footer.php");
}

function reviews_index() {
 global $bgcolor4, $sitename, $prefix, $multilingual, $field, $currentlang, $dbi, $module_name, $banners;
    include ('header.php');

    OpenTable();
      $tfnum = sql_num_rows(sql_query("select * from ".$prefix."_reviews", $dbi));
      echo "<table align=center width=100%  border=0 cellpadding=5 cellspacing=0>
<tr>
   <td valign=top width=180>
   <img src=\"modules/Home2/mihaven.jpg\"><br>
  Mihaven.com is currently serving <b>$tfnum</b> Talent Files.<br><br>


  <b>Newest Talent Files:</b><br>\n";

   $sql = "SELECT id, title, hits FROM ".$prefix."_reviews ORDER BY id DESC LIMIT 0,10";
$result = $db->sql_query($sql);
        while ($row = $db->sql_fetchrow($result)) {
   $id = $row[id];
   $title = $row[title];
      $hits = $row[hits];
            echo "<img src=\"images/tri.gif\">&nbsp;<a href=\"reviews.html&amp;rop=showcontent&amp;id=$id\">$title</a><br>\n";

         }

     echo "<br><br><b>Most Popular:</b><br>\n";

     $sql = "SELECT id, title, hits FROM ".$prefix."_reviews ORDER BY hits DESC LIMIT 0,10";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$hits = $row[hits];
  echo "<img src=\"images/tri.gif\">&nbsp;<a href=\"reviews.html&amp;rop=showcontent&amp;id=$row[id]\">$row[title]</a><br>";
}

   echo "<br><br><a href=\"reviews.html&rop=write_review\"><img src=\"modules/Home2/bandpromo.jpg\" border=0></a><br>\n";
   echo "<a href=\"modules.php?name=Encyclopedia\"><img src=\"modules/Home2/michiganscene2.jpg\" border=0></a><br>\n";
      echo "</td><td valign=top><img src=\"modules/Home2/talentfiles.jpg\"><br>\n";


    switch ($field) {

   case "reviewer":
   $result = sql_query("SELECT id, title, hits, reviewer, score FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by reviewer $order", $dbi);
   break;

   case "score":
   $result = sql_query("SELECT id, title, hits, reviewer, score FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by score $order", $dbi);
   break;

   case "hits":
   $result = sql_query("SELECT id, title, hits, reviewer, score FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by hits $order", $dbi);
   break;

   default:
   $result = sql_query("SELECT id, title, hits, reviewer, score FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by title $order", $dbi);
   break;

    }
    $numresults = sql_num_rows($result, $dbi);
    if ($numresults == 0) {
   echo "<i><b>"._NOREVIEWS." \"$letter\"</b></i><br><br>";
    } elseif ($numresults > 0) {
   echo "<TABLE BORDER=\"0\" width=\"100%\" CELLPADDING=\"2\" CELLSPACING=\"4\">
      <tr>
   
     <td width=\"50%\" bgcolor=\"$bgcolor4\">
      <P ALIGN=\"LEFT\"><B>Band Name: </B>
      </td>
   
        <td width=\"18%\" bgcolor=\"$bgcolor4\">
      <P ALIGN=\"CENTER\"><B> Genre: </B>
      </td>
   
     <td width=\"14%\" bgcolor=\"$bgcolor4\">
      <P ALIGN=\"CENTER\"><B> Hits: </B>
      </td>
      </tr>";


   while($myrow = sql_fetch_array($result, $dbi)) {
       $title = $myrow["title"];
       $id = $myrow["id"];
       $reviewer = $myrow["reviewer"];
       $email = $myrow["email"];
       $score = $myrow["score"];
       $hits = $myrow["hits"];
       echo "<tr>
          <td width=\"50%\" bgcolor=\"#EEEEEE\"><a href=\"modules.php?name=$module_name&rop=showcontent&amp;id=$id\">$title</a></td>
         <td width=\"18%\" bgcolor=\"#EEEEEE\"><center>";
       display_score($score);
       echo "</center></td><td width=\"14%\" bgcolor=\"#EEEEEE\"><center>$hits</center></td>
        </tr>";
   }
   echo "</TABLE><p>";
       }
    if ($banners) {
   include("banners.php");
    }
    echo "</td></tr></table>\n";
    CloseTable();
     include ("footer.php");
}


function showcontent($id, $page) {
    global $admin, $uimages, $prefix, $dbi, $banners, $module_name;
    include ('header.php');
    OpenTable();
 if (($page == 1) OR ($page == "")) {
   sql_query("UPDATE ".$prefix."_reviews SET hits=hits+1 WHERE id=$id", $dbi);
    }
    $result = sql_query("SELECT * FROM ".$prefix."_reviews WHERE id=$id", $dbi);
    $myrow =  sql_fetch_array($result, $dbi);
    $id =  $myrow["id"];
    $date = $myrow["date"];
    $year = substr($date,0,4);
    $month = substr($date,5,2);
    $day = substr($date,8,2);
    $fdate = date("F jS Y",mktime (0,0,0,$month,$day,$year));
    $title = $myrow["title"];
    $text = $myrow["text"];
    $cover = $myrow["cover"];
    $reviewer = $myrow["reviewer"];
    $email = $myrow["email"];
    $hits = $myrow["hits"];
    $url = $myrow["url"];
    $url_title = $myrow["url_title"];
     $questionone = $myrow["questionone"];
    $score = $myrow["score"];
    $rlanguage = $myrow["rlanguage"];
    $contentpages = explode( "<!--pagebreak-->", $text );
    $pageno = count($contentpages);
    if ( $page=="" || $page < 1 )
   $page = 1;
    if ( $page > $pageno )
   $page = $pageno;
    $arrayelement = (int)$page;
    $arrayelement --;


  echo "<table align=center width=100%  border=0 cellpadding=5 cellspacing=0>
<tr>
   <td width=180 valign=top><img src=\"modules/Home2/mihaven.jpg\"><br>\n";
     if (is_admin($admin))
      echo "<b>"._ADMIN."</b> [ <a href=\"modules.php?name=$module_name&rop=mod_review&amp;id=$id\">"._EDIT."</a> | <a href=modules.php?name=$module_name&rop=del_review&amp;id_del=$id>"._DELETE."</a> ]<br>";
     echo "<b>$title</b><br>\n";


     if ($score != "")
   echo "<b>Band Genre:</b>&nbsp;";
display_score($score);
      

             echo "<br><b>Talent File Added:</b> $fdate<br>";

    if ($reviewer != "")
     echo "<b>Posted By:</b> <a href=mailto:$email>$reviewer</a>";
    echo "<br><b>Total Hits:</b> $hits<p>\n";
    echo "<b>$title Related Links:</b><br>";
       echo "<strong><big>&middot;</big></strong>&nbsp;<a href=\"article-topic-.html$id\">$title News Room</a><br>";
    echo "<strong><big>&middot;</big></strong>&nbsp;<a href=\"links.html&l_op=search&query=$title&min=0&orderby=titleA\">Visit $title Website(s)</a><br>";
    news($id);
       if ($url != "")
      echo "<strong><big>&middot;</big></strong>&nbsp;<a href=\"$url\" TARGET=\"_blank\">$url_title</a><br>";

   echo "<p><img src=\"modules/Home2/blankright.jpg\"><br>\n";

     talentfilelinks($id);
   echo "</td><td valign=top><img src=\"modules/Home2/talentfile.jpg\"><br>\n";

     if ($cover != "")
    echo "<img src=\"images/talentfiles/$cover\" border=1 vspace=0 alt=\"$title band pic\"><p>\n";

  if ($questionone != "")
    echo "$questionone<p>\n";

echo "<span style=\"font-size: 15pt\"><b>$title.</b></span>\n";



    echo "<BLOCKQUOTE><p align=justify>";
    echo "$contentpages[$arrayelement]<p>\n";

   
        echo "</BLOCKQUOTE><p>\n";
     if ($pageno > 1) {
   echo "<br><b>You are on page: $page/$pageno</b><br>
  Page 1 contains various $title Info.<br>
  Page 2 contains various $title and Christianity relation info.<br>";
   }
      echo "</CENTER>";
    $title = urlencode($title);
    if($page >= $pageno) {
     $next_page = "";
    } else {
   $next_pagenumber = $page + 1;
   if ($page != 1) {
       $next_page .= "";
   }
   $next_page .= "<b>Go to <a href=\"modules.php?name=$module_name&rop=showcontent&amp;id=$id&amp;page=$next_pagenumber\">"._NEXT." ($next_pagenumber/$pageno)</a></b>";
    }
    if($page <= 1) {
   $previous_page = "";
    } else {
   $previous_pagenumber = $page - 1;
   $previous_page = "<b>Go to <a href=\"modules.php?name=$module_name&rop=showcontent&amp;id=$id&amp;page=$previous_pagenumber\">"._PREVIOUS." ($previous_pagenumber/$pageno)</a></b>";
    }
    echo "<center>
   $previous_page &nbsp;&nbsp; $next_page<br><br> </td>
</tr>
</table>";

       CloseTable();
    if (($page == 1) OR ($page == 2)) {
   echo "<br>";
    }
   include ("footer.php");
}

function mod_review($id) {
   global $admin, $prefix, $dbi, $module_name;
   include ('header.php');
   OpenTable();
   if (($id == 0) || (!is_admin($admin)))
       echo "This function must be passed argument id, or you are not admin.";
   else if (($id != 0) && (is_admin($admin)))
   {
      $result = sql_query("select * from ".$prefix."_reviews where id = $id", $dbi);
      while($myrow =  sql_fetch_array($result, $dbi))
      {
         $id =  $myrow["id"];
         $date = $myrow["date"];
         $title = $myrow["title"];
          $text = $myrow["text"];
         $cover = $myrow["cover"];
         $reviewer = $myrow["reviewer"];
         $email = $myrow["email"];
         $hits = $myrow["hits"];
         $url = $myrow["url"];
         $url_title = $myrow["url_title"];
         $questionone = $myrow["questionone"];
      $score = $myrow["score"];
         $rlanguage = $myrow["rlanguage"];
      }
      echo "<center><b>"._REVIEWMOD."</b></center><br><br>";
      echo "<form method=POST action=modules.php?name=$module_name&rop=preview_review><input type=hidden name=id value=$id>";
      echo "<TABLE BORDER=0 width=100%>
         <tr>
            <td width=12%><b>"._RDATE."</b></td>
            <td><INPUT TYPE=text NAME=date SIZE=15 VALUE=\"$date\" MAXLENGTH=10></td>
         </tr>
         <tr>
            <td width=12%><b>"._RTITLE."</b></td>
            <td><INPUT TYPE=text NAME=title SIZE=50 MAXLENGTH=150 value=\"$title\"></td>
         </tr>
            <tr>
               <tr>";
      echo "<tr>
            <td width=12%><b>"._RTEXT."</b></td>
            <td><TEXTAREA class=textbox name=text rows=20 wrap=virtual cols=60>$text</TEXTAREA></td>
         </tr>
         
      <tr>          
               <td width=12%><b>"._REVIEWER."</b></td>
            <td><INPUT TYPE=text NAME=reviewer SIZE=41 MAXLENGTH=40 value=\"$reviewer\"></td>
         </tr>
         <tr>
            <td width=12%><b>"._REVEMAIL."</b></td>
            <td><INPUT TYPE=text NAME=email value=\"$email\" SIZE=30 MAXLENGTH=80></td>
         </tr>
         <tr>
            <td width=12%><b>Genre:</b></td>
            <td><INPUT TYPE=text NAME=score value=\"$score\" size=3 maxlength=2></td>
         </tr>
         <tr>
            <td width=12%><b>"._RLINK."</b></td>
            <td><INPUT TYPE=text NAME=url value=\"$url\" size=30 maxlength=100></td>
         </tr>
         <tr>
            <td width=12%><b>"._RLINKTITLE."</b></td>
            <td><INPUT TYPE=text NAME=url_title value=\"$url_title\" size=30 maxlength=50></td>
         </tr>
         <tr>
            <td width=12%><b>Question One:</b></td>
            <td><TEXTAREA class=textbox name=questionone rows=20 wrap=virtual cols=60>$questionone</TEXTAREA></td>
         </tr>
      <tr>
            <td width=12%><b>"._COVERIMAGE."</b></td>
            <td><INPUT TYPE=text NAME=cover value=\"$cover\" size=30 maxlength=100></td>
         </tr>
         <tr>
            <td width=12%><b>"._HITS.":</b></td>
            <td><INPUT TYPE=text NAME=hits value=\"$hits\" size=5 maxlength=5></td>
         </tr>
      </TABLE>";
      echo "<input type=hidden name=rop value=preview_review><input type=submit value=\""._PREMODS."\">&nbsp;&nbsp;<input type=button onClick=history.go(-1) value="._CANCEL."></form>";
   }
   CloseTable();
   include ("footer.php");
}

function del_review($id_del) {
    global $admin, $prefix, $dbi, $module_name;
    if (is_admin($admin)) {
       sql_query("delete from ".$prefix."_reviews where id = $id_del", $dbi);
   sql_query("delete from ".$prefix."_reviews_comments where rid='$id_del'", $dbi);
   Header("Location: modules.php?name=$module_name");
    } else {
       echo "ACCESS DENIED";
    }
}

function del_comment($cid, $id) {
    global $admin, $prefix, $dbi, $module_name;
    if (is_admin($admin)) {
        sql_query("delete from ".$prefix."_reviews_comments where cid='$cid'", $dbi);
        Header("Location: modules.php?name=$module_name&rop=showcontent&id=$id");
    } else {
        echo "ACCESS DENIED";
    }
}

switch($rop) {

   case "showcontent":
   showcontent($id, $page);
   break;

   case "write_review":
   write_review();
   break;

   case "preview_review":
   preview_review($date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $questionone, $hits, $id);
   break;

   case ""._YES."":
   send_review($date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $questionone, $hits, $id);
   break;

   case "del_review":
   del_review($id_del);
   break;

   case "mod_review":
   mod_review($id, $date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $questionone, $hits, $id);
   break;

   case "postcomment":
   postcomment($id, $title);
   break;

   case "savecomment":
   savecomment($xanonpost, $uname, $id, $score, $comments);
   break;

   case "del_comment":
   del_comment($cid, $id);
   break;

   default:
   reviews_index();
   break;
}

?>


Last edited by zao on Tue Jun 28, 2005 7:50 am; edited 2 times in total
Find all posts by zaoView user's profileSend private message
zao
Nuke Soldier
Nuke Soldier


Joined: Apr 16, 2004
Posts: 26


PostPosted: Thu May 05, 2005 8:02 am Reply with quoteBack to top

Just for my own saftey, There needs to be a cutt off limit of like 15 people who get banners, or something.. I dont know, but I cant give out 50,000 banner ads. haha!
Find all posts by zaoView user's profileSend private message
gettopreacherman
Lieutenant
Lieutenant


Joined: Jan 13, 2005
Posts: 262


PostPosted: Thu May 05, 2005 8:18 am Reply with quoteBack to top

Code:
sql_query("UPDATE ".$prefix."_reviews SET date='$date', title='$title', text='$text', reviewer='$reviewer', email='$email', score='$score', cover='$cover', url='$url', url_title='$url_title', 'questionone='$questionone', hits='$hits', rlanguage='$rlanguage' where id = $id", $dbi);
   echo "Thanks ADMIN.";
    } else {
   sql_query("INSERT INTO ".$prefix."_reviews_add VALUES (NULL, '$date', '$title', '$text', '$reviewer', '$email', '$score', '$url', '$url_title', '$questionone', '$rlanguage')", $dbi);


these don't have the same number of parameters...short by one in the second. as for the same value, try stipulating your columns with your values, like INSERT INTO (col1,col2) VALUES (val1,val2)...what I would also do is assign these to variables then echo the variables to track how your variables are being passed and in what order.
Find all posts by gettopreachermanView user's profileSend private message
shrek_rock
Captain
Captain


Joined: Nov 24, 2003
Posts: 709


PostPosted: Thu May 05, 2005 8:18 am Reply with quoteBack to top

You may also need to go to admin/modules/reviews.php and make the necessary changes there too..

_________________
Image

Image
Find all posts by shrek_rockView user's profileSend private messageSend e-mailVisit poster's website
zao
Nuke Soldier
Nuke Soldier


Joined: Apr 16, 2004
Posts: 26


PostPosted: Thu May 05, 2005 9:00 am Reply with quoteBack to top

Well I tried loading the original modules/Reviews/index.php, along with only my $questionone field added, and it worked, so Im going to go from there.. Thanks to you two for trying to help me. "Gettopreacherman", if you want advertising, send me your email in private message and I will contact you about it..
Find all posts by zaoView user's profileSend private message
zao
Nuke Soldier
Nuke Soldier


Joined: Apr 16, 2004
Posts: 26


PostPosted: Tue Jun 28, 2005 8:18 am Reply with quoteBack to top

gettopreacherman - I sent you a private message about free ads for your help. If you are interested, check it out. Im making the cutt-off date August 05. -zao
Find all posts by zaoView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.303 Seconds - 296 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::