Parašė namo· 2009 Kov. 7 16:03:32
#1
Turiu perdaryta pageidavimu panele, bet neveikia pageidavimo istrinimo funkcija, gal kas zino kaip sutvarkyt?
<?php
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once ADMIN."navigation.php";
$result = mysql_query("SELECT * FROM ".$db_prefix."pageidavimai WHERE id = '1'")
or die ("Klaida portalo sistemoje");
if(dbrows($result) != 0)
{
}
else
{
$rezas = mysql_query("INSERT INTO ".$db_prefix."pageidavimai (id, pageidavimas, nario_id, laikas)
VALUES('1', 'Praðome netrinti ðio pageidavimo, nes tai yra svarbus sistemai.','1', '".time()."')")
or die ("Klaida sistemoje.Pabandykite vëliau");
echo "Instaliacija baigta";
}
if (!defined("IN_FUSION") || !checkrights("I")) { header("Location:../../index.php"); exit; }
$nowdo = $_GET['nowdo'];
opentable("Pageidavimai");
$result = mysql_query("SELECT * FROM ".$db_prefix."pageidavimai WHERE id != '1' ORDER BY laikas ASC")
or die ("Klaida portalo sistemoje");
if (mysql_num_rows($result) > 0)
{
while($nu = mysql_fetch_object($result))
{
$uzklau = "SELECT * FROM ".$db_prefix."users WHERE user_id = '$nu->nario_id' ";
$resultas = mysql_query($uzklau);
$h = mysql_fetch_object($resultas);
echo "$nu->pageidavimas<br>[<a href='".BASEDIR."profile.php?lookup=$nu->nario_id'><b><i>$h->user_name</i></b></a>] ";
echo " <a href='".$aidlink." nowdo=delete id=$nu->id'>Trinti</a>";
}
}
else
{
echo "Pageidavimu nera";
}
closetable();
if ($nowdo == delete)
{
$id = $_GET['id'];
$result = mysql_query("DELETE FROM ".$db_prefix."pageidavimai WHERE id = '$id'")
or die ("Klaida portalo sistemoje");
redirect(FUSION_SELF.$aidlink."");
}
if ($nowdo == onreq)
{
$result = mysql_query("UPDATE ".$db_prefix."pageidavimai SET statusas='1' WHERE id = '1'") or die ("Klaida portalo sistemoje");
redirect(BASEDIR."index.php");
}
if ($nowdo == offreq)
{
$zzzz= mysql_query("UPDATE ".$db_prefix."pageidavimai SET statusas='0' WHERE id = '1'")
or die ("Klaida portalo sistemoje");
redirect(BASEDIR."index.php");
}
require_once "../../footer.php";
?>