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

Parašė ramon· 2007 Gru. 23 21:12:44
#16

Kodas i pievas :]

#1
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats");
if (dbrows($result) != 0) {
   if ($step == "delete") {
      $result = dbquery("DELETE FROM ".$db_prefix."downloads WHERE download_id='$download_id'");
      redirect("news.php");



#2
if ($step == "edit") {
         $download_datestamp = isset($_POST['update_datestamp']) ? ", download_datestamp='".time()."'" : "";
         $result = dbquery("UPDATE ".$db_prefix."downloads SET download_title='$download_title', download_description='$download_description', download_url='$download_url', download_cat='$download_cat', download_license='$download_license', download_os='$download_os', download_version='$download_version', download_filesize='$download_filesize'".$download_datestamp." WHERE download_id='$download_id'");
         redirect("news.php");
      } else {
         $result = dbquery("INSERT INTO ".$db_prefix."downloads (download_title, download_description, download_url, download_cat, download_license, download_os, download_version, download_filesize, download_datestamp, download_count) VALUES ('$download_title', '$download_description', '$download_url', '$download_cat', '$download_license', '$download_os', '$download_version', '$download_filesize', '".time()."', '0')");
         redirect("news.php");