Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: anekdotai

Parašė BloodKiller· 2008 Sau. 2 18:01:01
#6

O dabar pamegink keisti. :)

if (isset($_POST['rate'])) {
      if (isNum($_POST['rating']) && !dbcount("(*)","joke_ratings","rate_user = '".$userdata['user_id']."' AND rate_subject = '".$data['joken_id']."'") && iMEMBER) {
         $rezultatas = dbquery("INSERT INTO ".$db_prefix."joke_ratings (rate_user,rate_subject,rate_opt,rate_date,rate_ip) VALUES ('".$userdata['user_id']."','".$data['joken_id']."','".$_POST['rating']."','".time()."','".$_SERVER['REMOTE_ADDR']."');");
         if ($rezultatas) redirect(BASEDIR."anekdotai.php?cat_id=$cat_id");
      }
   }




i

if (isset($_POST['rate'])) {
      if (isNum($_POST['rating']) && !dbcount("(*)","joke_ratings","rate_user = '".$userdata['user_id']."' AND rate_subject = '".$_POST['joken_id']."'") && iMEMBER) {
         $rezultatas = dbquery("INSERT INTO ".$db_prefix."joke_ratings (rate_user,rate_subject,rate_opt,rate_date,rate_ip) VALUES ('".$userdata['user_id']."','".$_POST['joken_id']."','".$_POST['rating']."','".time()."','".$_SERVER['REMOTE_ADDR']."');");
         if ($rezultatas) redirect(BASEDIR."anekdotai.php?cat_id=$cat_id");
      }
   }




O sita

echo "<table width='600' align='center' cellpadding='0' cellspacing='1' class='tbl-border'><tr><td class='tbl2'><input type='hidden' name='joke_id' value='joken_id'>";




Reiketu keisti i

echo "<table width='600' align='center' cellpadding='0' cellspacing='1' class='tbl-border'><tr><td class='tbl2'><input type='hidden' name='joke_id' value='".$data['joken_id']."'>";



Redagavo BloodKiller· 2008 Sau. 2 18:01:44