a ecco.. grazie giova:)
- Home
- leviathan73
- Post
leviathan73
@leviathan73
Post creati da leviathan73
-
Costruire tabella
Ciao a tutti sto cercando di costriure 2 tabelle, che dovrei importare nel database.. la prima è questa:
ron_bgprofile
la sua query:
[PHP]$sql = "SELECT id, avlink FROM ron_bgprofile ORDER BY id DESC LIMIT $limit_start, $items_per_page[/PHP]
e la tabella che sto facendo:
[PHP]--
-- Table structure for tableron_bgprofile
CREATE TABLE
ron_bgprofile
(
id
int(10) NOT NULL auto_increment,
avlink
varchar(30) NOT NULL default '',
PRIMARY KEY (id
),
UNIQUE KEYid
(id
)
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;--
-- Dumping data for tableron_bgprofile
[/PHP]
e l'altra tabella è questa:
ron_kar
la sua query:
[PHP]$avlnk = mysql_fetch_array(mysql_query("SELECT itemurl,title FROM ron_kar WHERE id='".$avid."'"));
[/PHP]
e la tabella che sto facendo:
[PHP]--
-- Table structure for tableron_kar
CREATE TABLE
ron_kar
(
itemurl
int(10) NOT NULL auto_increment,
title
varchar(30) NOT NULL default '',
PRIMARY KEY (id
),
UNIQUE KEYitemurl
(itemurl
)
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;--
-- Dumping data for tableron_kar
[/PHP]
ma le ambedue tabelle non vanno.. dove sbaglio? -
VIP utenti
Ciao a tutti, quando vado a dare nel profilo una qualifica superore a un utente, mi si aggiorna correttamente, ma da errore nel profilo vip, e il suo status nel profilo rimane utente semplice
ownercp.php
[PHP]////////////////////////////////////////////else if($action=="chubi")
{
echo "<head>";
echo "<title>Owner Tools</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
$who = $_GET["who"];
$unick = getnick_uid($who);
$avat = getavatar($who);
$email = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
$bdy = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$who."'"));
$uloc = mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$who."'"));
$usig = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
$sx = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id='".$who."'"));
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$who."'"));
$specialid = mysql_fetch_array(mysql_query("SELECT specialid FROM ibwf_users WHERE id='".$who."'"));if($unick=="admin"){ echo "<p align=\"center\">"; echo "<strong>YOU ARE EDITING A CRITICAL STAFF MEMBERS PROFILE. <br/>"; echo "PLEASE BE AWARE IF THIS USER IS RE-MOVED FROM OWNER STATUS YOUR SITE WILL BE AUTOMATICLY DISABLED INSTANTLY</strong>"; echo "</p>"; } echo "<p align=\"center\">"; echo "<form action=\"ownrproc.php?action=uprof&sid=$sid&who=$who\" method=\"post\">"; echo "Nickname: <input name=\"unick\" value=\"$unick\" maxlength=\"15\"/><br/>"; echo "Profile Pic: <input name=\"savat\" value=\"$avat\" maxlength=\"100\"/><br/>"; echo "E-Mail: <input name=\"semail\" value=\"$email[0]\" maxlength=\"100\"/><br/>"; echo "Birthday<small>(YYYY-MM-DD)</small>: <input name=\"ubday\" value=\"$bdy[0]\" maxlength=\"50\"/><br/>"; echo "Location: <input name=\"uloc\" value=\"$uloc[0]\" maxlength=\"50\"/><br/>"; echo "Info: <input name=\"usig\" value=\"$usig[0]\" maxlength=\"100\"/><br/>"; echo "*: <select name=\"usex\" value=\"$sx[0]\">"; echo "<option value=\"M\">Male</option>";
if($sx[0]=="F"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="F"$selected>Female</option>";
echo "</select><br/>";
echo "Privileges: <select name="perm" value="$perm[0]">";
echo "<option value="0">Normal</option>";
if($perm[0]=="1"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="1"$selected>Moderator</option>";
if($perm[0]=="2"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="2"$selected>Admin</option>";
if($perm[0]=="3"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="3"$selected>Head Admin</option>";
if($perm[0]=="4"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="4"$selected>Owner</option>";echo "</select><br/>";
echo "VIP: <select name="specialid" value="$specialid[0]">";
echo "<option value=\"0\">Normal</option>";
if($perm[0]=="5"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="5">Special User</option>";
if($perm[0]=="6"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="6">Coder</option>";
if($perm[0]=="7"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="7">Security Member</option>";
if($perm[0]=="8"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="8">Powerful Member</option>";
if($perm[0]=="9"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="9">Quiz Masterz</option>";
if($perm[0]=="10"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="10">Millionaires</option>";
if($perm[0]=="11"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="11">Prince</option>";
if($perm[0]=="12"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="12">Princess</option>";
if($perm[0]=="13"){$selected=" selected="selected"";}else{$selected="";}
echo "<option value="13">Lover</option>";
echo "</select><br/>";echo "<input type=\"Submit\" Name=\"Submit\" Value=\"Update\"></form>"; echo "<br/><br/>"; echo "<form action=\"ownrproc.php?action=upwd&sid=$sid&who=$who\" method=\"post\">"; echo "Password: <input name=\"npwd\" style=\"-wap-input-format: '*x'\" maxlength=\"15\"/><br/>"; echo "<input type=\"Submit\" Name=\"Submit\" Value=\"Change\"></form>"; echo "</p>"; echo "<p align=\"center\">"; echo "<b>8 </b><a accesskey=\"8\" href=\"ownercp.php?action=chuinfo&sid=$sid\">Users Info</a><br/>";
echo "<b>9 </b><a accesskey="9" href="ownercp.php?action=ownercp&sid=$sid"><img src="../images/admn.gif" alt=""/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey="0" href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
echo "</body>";}[/PHP]
ownerproc.php
[PHP]//////////////////////////edit profile//////////////////////////else if($action=="uprof")
{
$who = $_GET["who"];
$unick = $_POST["unick"];
$perm = $_POST["perm"];
$savat = $_POST["savat"];
$semail = $_POST["semail"];
$ubday = $_POST["ubday"];
$uloc = $_POST["uloc"];
$usig = $_POST["usig"];
$usex = $_POST["usex"];
$specialid = $_POST["specialid"];
$user = getnick_uid($who);
echo "<head>";
echo "<title>Admin Tools</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<p align="center">";
$onk = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$who."'"));
$exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name='".$unick."'"));
if($onk[0]!=$unick)
{
if($exs[0]>0)
{
echo "<img src="../images/notok.gif" alt="x"/>New nickname already exist, choose another one<br/>";
}else
{
$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', *='".$usex."', name='".$unick."',specialid='".$specialid."', perm='".$perm."' WHERE id='".$who."'");
if($res)
{
echo "<img src="../images/ok.gif" alt="o"/>$unick profilo aggiornato con successo<br/>";
}else{
echo "<img src="../images/notok.gif" alt="x"/>Errore profilo di $unick<br/>";
}
}
}else
{
$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', *='".$usex."', name='".$unick."',specialid='".$specialid."', perm='".$perm."' WHERE id='".$who."'");
if($res)
{
echo "<img src="../images/ok.gif" alt="o"/>$unick profilo vip aggiornato con successo<br/>";
}else{
echo "<img src="../images/notok.gif" alt="x"/>errore profilo vip $unick<br/>";
}
}
echo "<br/><b>8 </b><a accesskey="8" href="admincp.php?action=chuinfo&sid=$sid">Users Info</a><br/>";
echo "<br/><b>9 </b><a accesskey="9" href="ownercp.php?action=ownercp&sid=$sid"><img src="../images/admn.gif" alt=""/>Owner Tools</a><br/>";
echo "<b>0 </b><a accesskey="0" href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p></body>";
}[/PHP]
cosa c'è di sbagliato in questa query?
[PHP]$res = mysql_query("UPDATE ibwf_users SET avatar='".$savat."', email='".$semail."', birthday='".$ubday."', location='".$uloc."', signature='".$usig."', *='".$usex."', name='".$unick."',specialid='".$specialid."', perm='".$perm."' WHERE id='".$who."'");[/PHP]
credo che sia qua il problema -
Estrarre immagine dal database
Ciao ho inserito un indirizzo di un immagine nel database, ho messo la query per estrarre l'immagine dal database, ma nella stanza della chat non si vedere .. dove ho sbagliato?
[PHP]//////////////////////////
else if($action=="addchr")
{
$chrnm = $_POST["chrnm"];
$pic = $_POST["pic"];
$pic = mysql_fetch_array(mysql_query("SELECT pic FROM ibwf_rooms WHERE name='pic'"));
$chrage = $_POST["chrage"];
$maxage = $_POST["maxage"];
$chrpst = $_POST["chrpst"];
$chrprm = $_POST["chrprm"];
$chrcns = $_POST["chrcns"];
$chrfun = $_POST["chrfun"];
echo "<head>";
echo "<title>Admin Tools</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<p align="center">";
if(!isadmin(getuid_sid($sid)))
{
echo "Permission Denied!";
}else{
echo $chrnm;
echo "<br/>";
$pic = mysql_fetch_array(mysql_query("SELECT pic FROM ibwf_rooms WHERE name='pic'"));
$res = mysql_fetch_array (mysql_query("INSERT INTO ibwf_rooms SET name='".$chrnm."', pic='".$pic."', static='1', pass='', mage='".$chrage."', maxage='".$maxage."', chposts='".$chrpst."', perms='".$chrprm."', censord='".$chrcns."' , freaky='".$chrfun."'"));
echo mysql_error();
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>Chatroom added successfully";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error adding Chat room";
}
}[/PHP]
[PHP]else if ($action=="chat")
{
$pic = $_POST["pic"];
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
addonline(getuid_sid($sid),"è nella lista delle Chatroom ($mmsg)","index.php?action=chat");
echo "<head>";
echo "<title>Lista Chatroom</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<p align="center">";
echo "<img src="../images/chat3.gif" alt=""/>";
echo popup($sid);
echo "<p align="center">";
$pic = mysql_fetch_array(mysql_query("SELECT pic FROM ibwf_rooms WHERE static='1'"));
$rooms = mysql_query("SELECT id, name, perms, mage, pic, chposts FROM ibwf_rooms WHERE static='1' AND clubid='0'");
while ($room= mysql_fetch_array($rooms))
{
}
$pic = mysql_query("SELECT id, name, pass, pic FROM ibwf_rooms WHERE static='1' AND clubid='0'");
while ($room= mysql_fetch_array($rooms)){ /*if(canenter($room[0], $sid)) {*/ $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$room[0]."'")); echo "<a href=\"chat.php?sid=$sid&rid=$room[0]\">$room[1]($noi[0])</a><br/>"; /*}*/ } echo "<br/>";[/PHP]
-
RE: Non scrive
se ti riferisci a questa variabile[PHP]$action = $_GET["action"];[/PHP] già c'è lo in alto alle pagine.
-
Non scrive
Ciao a tutti ho questa funzione, ma non mi fa scrivere il messaggio in stanza, ma nella tabella del database è memorizzato il messaggio, quindi è la funzione che non riesco a dargli la giusta funzione
[PHP]echo "<form action="genproc.php?action=general&sid=$sid" method="post">";
echo "<br/>Oggetto: <input name="fmsg" value="$fmsg" maxlength="255" />";
echo "<br/><input type="Submit" Name="Submit" Value="Invio"></form>";[/PHP]
[PHP]//////////////////////////oggetto chat//////////////////////////if($action=="general")
{
$fmsg = $_POST["fmsg"];echo "<head>";
echo "<title>Oggetto Chat</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<p align="center">";$res = mysql_query("UPDATE ibwf_settingss SET value='".$fmsg."' WHERE name='4ummsg'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>Oggetto scritto con successo<br/>";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Errore oggetto scritto<br/>";
}
echo "<b>0 </b><a accesskey="0" href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
echo "</body>";
}[/PHP]
[PHP]if($action=="general")
{
$fmsg = $_POST["fmsg"];echo "<head>";
echo "<title>Oggetto Chat</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<p align="center">"; $res = mysql_query("UPDATE ibwf_settingss SET value='".$fmsg."' WHERE name='4ummsg'");
if($res)
{
echo "<img src="../images/ok.gif" alt="O"/>scritto con successo<br/>";
}else{
echo "<img src="../images/notok.gif" alt="X"/>Error scrittura<br/>";
}
echo "<b>0 </b><a accesskey="0" href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
echo "</body>";
}[/PHP] -
RE: Immagine non si vede
ho messo echo davanti, ora si vede, ma c'è un problema, il codice immagine lo messo nella parte dove mi interessa, ma l'immagine casuale va pure nelle altre stanze di sistema, invece dovrebbe andare solo nella stanza creata. Metto il pezzo di codice dove lo inserito..
[php]<?php
include("config.php");
include("core.php");
connectdb();
$color=$_POST;
$action=$_GET["action"];
$id=$_GET["id"];
$sid = $_GET["sid"];
$rid=$_GET["rid"];
$rpw=$_GET["rpw"];
$uid = getuid_sid($sid);
$uexist = isuser($uid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$data = date("H:i");if((islogged($sid)==false)||!$uexist)
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/white_medium.css">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "Non sei loggato<br/>";
echo "O la tua sessione è scaduta<br/><br/>";
echo "<a href="index.php">Login</a>";
echo "</center>";
echo "</html>";
echo "</body>";
exit();
}if(isbanned($uid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<p align="center">";
echo "<img src="../images/notok.gif" alt="x"/><br/>";
echo "<b>Sei stato Bannato</b><br/><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "<b>Tempo rimasto: </b>$rmsg<br/>";
$nick = getnick_uid($banto[2]);
echo "<b>By: </b>$nick<br/>";
echo "<b>Motivo: </b>$banto[1]";
//echo "<a href="index.php">Login</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$rooms = mysql_query("SELECT id, name, pass, pic FROM ibwf_rooms WHERE static='0'");
$ilink = $room[3];
if($ilink=="")
{
echo $ilink = "<img src="../images/logo.gif" alt=""/>";
}else{
echo $ilink = "<img src="$ilink" alt=""/>";
}
echo "<br/>";$pic = mysql_escape_string($_POST["pic"]);
$pic = htmlspecialchars($pic);
$res = mysql_query("INSERT INTO ibwf_rooms SET name='".$rname."', pass='".$rpass."', censord='".$cns."', static='0', lastmsg='".time()."', pic='".$pic."'");$isroom = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rooms WHERE id='".$rid."'")); if($isroom[0]==0) { echo "<head>"; echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "<b>La Room non esiste</b><br/><br/>";
echo "<a href="index.php?action=chat&sid=$sid">Chatrooms</a>";
echo "</center>";
echo "</body>";
echo "</html>";
exit();
}
$passworded = mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_rooms WHERE id='".$rid."'"));
if($passworded[0]!="")
{
if($rpw!=$passworded[0])
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "<b>Password Errata!</b><br/>";
echo "Non è possibile entrare in questa stanza<br/><br/>";
echo "<a href="index.php?action=chat&sid=$sid">Chatrooms</a>";
echo "</center>";
echo "</body>";
echo "</html>";
exit();
}
}
if(!canenter($rid,$sid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "<b>Autorizzazione negata!</b><br/><br/>";
echo "<a href="index.php?action=chat&sid=$sid">Chatrooms</a>";
echo "</center>";
echo "</body>";
echo "</html>";
exit();
}addtochat($uid, $rid); $timeto = 300; $timenw = time(); $timeout = $timenw-$timeto; $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); $rname = $rooms[1]; $nick = getnick_sid($sid); if ($action=="") { echo "<head>"; echo "<title>$rname</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; $unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_popups WHERE unread='1' AND touid='".$uid."'")); if ($unreadpopup[0]<1) { echo "<meta http-equiv=\"refresh\" content=\"30; url=chat.php?time="; echo "".date("dmHis").""; echo "&sid=$sid&rid=$rid&rpw=$rpw\">"; } echo "</head>"; echo "<body>";
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
addonline($uid,"Chatta in $rname ($mmsg)","chat.php?rid=$rid&rpw=$rpw");
//echo "<p>";
echo popup($sid);
echo "<b>1 </b><a name="top" id="top" accesskey="1" href="chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw">Scrivi</a><br/>";
echo "<b>2 </b><a accesskey="2" href="#opt">vai giu</a><br/>";
echo "<b>* </b><a accesskey="*" href="chat.php?time=";
echo "".date("dmHis")."";
echo "&sid=$sid&rid=$rid&rpw=$rpw">Aggiorna</a><br/>";$unreadinbox=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND touid='".$uid."'")); $unrd="".$unreadinbox[0].""; if ($unreadinbox[0]>0)[/php]:bho:
-
RE: Non cancella
mi porta fuori dal mio sito.. qua c'è il codice
[PHP]//////////////////////////////////lirhi5
else if($action=="hi5")
{
$whonick = getnick_uid($who);
$who = $_GET["who"];
addonline(getuid_sid($sid),"Aggiunge indirizzi hi5","index.php?action=$action");
echo "<head>";
echo "<title>$stitle</title>";
echo "<link rel="stylesheet" type="text/css" href="themes/$theme[0]">";
echo "</head>";
echo "<body>";
$uid = getuid_sid($sid);//////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lirhi5")); $num_items = $noi[0]; //changable $items_per_page= 10; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page;
$sql = "SELECT id, uid, adresa FROM lirhi5 ORDER by id DESC LIMIT $limit_start, $items_per_page";
echo "<p align="center">";
// alerte
$uid = getuid_sid($sid);
$unreadpopup=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lirpopups WHERE unread='1' AND touid='".$uid."'"));
if ($unreadpopup[0]>0)
{
echo popup($sid);
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
echo "<img src="../images/meditatii.gif" alt=""/><b>Indirizzi Hi5</b><br/><br/>";
echo "<a href="index.php?action=adaugahi5&sid=$sid">(Aggiungi tuoi indirizzi qui hi5)</a><br/>";
echo "<p>";
echo "<p align="left">";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$descriere = parsepm($item[3], $sid);
$bonick = getnick_uid($item[1]);
$byview = ">->By: <a href="index.php?action=viewuser&who=$item[1]&sid=$sid">$bonick</a>";
if(candelbl($uid,$item[0]))
{
$dl = "|<a href="index.php?action=delhi5&did=$item[0]">[X]</a>";
}else{
$dl = "";
}echo " <small><b><font color=\"#88CC00\"><a href=\"$item[2]\">$item[2]</a> </font></b>$byview</small>
<small></small>$dl <br/>
";
// echo "$lnk";} } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"index.php?action=$action&page=$ppage&view=$view\">«Indietro</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"index.php?action=$action&page=$npage&view=$view\">Avanti»</a>"; } echo "<br/>$page/$num_pages<br/>"; if($num_pages>2) { $rets = "<form action=\"index.php\" method=\"get\">"; $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>"; $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>"; $rets .= "<input type=\"submit\" value=\"Vai a pagina\"/>"; $rets .= "</form>"; echo $rets; } echo "</p>";
////// UNTILL HERE >>
echo "<p align="center">";echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
echo "</body>";
}else if($action=="delhi5")
{
$bid = $_GET["bid"];
addonline(getuid_sid($sid),"cancella indirizzi hi5","");
echo "<head>"; echo "<title>$stitle</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">"; echo "</head>"; echo "<body>";
echo "<p align="center">";
if(candelmd(getuid_sid($sid), $bid))
{
$res = mysql_query("DELETE FROM lirhi5 WHERE id=$bid"); if($res) { echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Hi5 cancellato<br/>"; }else{ echo "<img src=\"../notok.gif\" alt=\"x\"/>Error!<br/>"; }
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Non puoi rimuovere questo Hi5";
}
echo "<br/>";
echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p></body>";
}
else if($action=="adaugahi5")
{addvisitor();
addonline(getuid_sid($sid),"aggiunge hi5","index.php?action=$action");echo "<head>"; echo "<title>adauga hi5</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; if(getplusses(getuid_sid($sid))<75) { echo "Devi avere almeno 75 Plus per aggiungere un indirizzo hi5!"; }else{
// alerte
$uid = getuid_sid($sid);echo "<form action=\"index.php?action=aadaugahi5&sid=$sid\" method=\"post\">"; echo "Indirizzi Hi5:<input name=\"hi5\" maxlength=\"30\"/><br/>";
// echo "Descrizione:<input name="descriere" maxlength="10000"/><br/>";
echo "<input type="submit" value="inserisci"/>";
echo "</form><br/>";
}
echo "<a href="index.php?action=hi5&sid=$sid"><img src="../images/meditatii.gif" alt=""/>Indirizzi hi5</a>";
echo "<br/><br/><a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
echo "</body>";
}else if($action=="aadaugahi5")
{
$hi5 = $_POST["hi5"];
$descriere = $_POST["descriere"];
//$qut = $_POST["qut"];
addonline(getuid_sid($sid),"aggiunge indirizzi hi5","");
echo "<head>"; echo "<title>$stitle</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">"; echo "</head>"; echo "<body>"; echo "<p align=\"center\">"; $crdate = time(); //$uid = getuid_sid($sid); $res = false; if((trim($hi5)!="")) { $res = mysql_query("INSERT INTO lirhi5 SET uid='".$uid."', adresa='".$hi5."'"); } if($res) { echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Indirizzo hi5 aggiunto"; }else{ echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error !!!"; } echo "<br/><br/>"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; echo "</body>";
}[/PHP]
-
Non cancella
Ciao a tutti, in questo codice non cancella il contatto selezionato
[PHP]$byview = ">->By: <a href="index.php?action=viewuser&who=$item[1]">".getsimbol($item[1])."$bonick</a>";if(candelbl($uid,$item[0])) { $dl = "|<a href=\"index.php?action=delhi5&bid=$item[0]\">[X]</a>"; }else{ $dl = ""; }
if(candelmd(getuid_sid($sid), $bid))
{
$res = mysql_query("DELETE FROM lirhi5 WHERE id='".$bid."'"); if($res) { echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Hi5 cancellato<br/>"; }else{ echo "<img src=\"../notok.gif\" alt=\"x\"/>Error!<br/>"; }[/PHP]
se clicco per cancellare
[PHP]$dl = "|<a href="index.php?action=delhi5&bid=$item[0]">[X]</a>";[/PHP]
mi fa uscire dal mio sito..
ho provato a cambiare:
$res = mysql_query("DELETE FROM lirhi5 WHERE id='".$bid."'");con questo:
$res = mysql_query("DELETE FROM lirhi5 WHERE id='$bid");
..ma da stesso risultato, chi puo risolvere il problema?:? -
Immagine non si vede
Ciao a tutti, ho queste funzioni
[php]$rooms = mysql_query("SELECT id, name, pass, pic FROM ibwf_rooms WHERE static='0'");
$co=0;
while ($room= mysql_fetch_array($rooms))
{
$ilink = $room[3];
if($ilink=="")
{
$ilink = "<img src="../images/logo.gif" alt=""/>";
}else{
$ilink = "<img src="../uploaded/files/$ilink" alt=""/>";
}
$co++;
if(canenter($room[0], $sid))
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$room[0]."'"));
if($room[2]=="")
{
echo "<a href="chat.php?sid=$sid&rid=$room[0]">".htmlspecialchars($room[1])."($noi[0])</a><br/>";
}else{
echo htmlspecialchars($room[1]);
//echo "($noi[0])";
echo "<form action="chat.php" method="get">";
echo "<br/><input format="*x" name="rpw" maxlength="10"/><br/>";
echo "<input type="submit" value="GO"/>";
echo "<input type="hidden" name="rid" value="$room[0]"/>";
echo "<input type="hidden" name="sid" value="$sid"/>";
echo "</form>";
}
}
}$pic = mysql_escape_string($_POST["pic"]);
$pic = htmlspecialchars($pic);
$res = mysql_query("INSERT INTO ibwf_rooms SET name='".$rname."', pass='".$rpass."', censord='".$cns."', static='0', lastmsg='".time()."', pic='".$pic."'");[/php]
[php]else if($action=="mkroom")
{
$rname = mysql_escape_string($_POST["rname"]);
$rpass = trim($_POST["rpass"]);
$pic = mysql_escape_string($_POST["pic"]);
addonline(getuid_sid($sid),"Sta creando una Chatroom","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<p align="center">";
if ($rpass=="")
{
$cns = 1;
}else{
$cns = 0;
}
$prooms = mysql_fetch_array(mysql_query("SELECT COUNT() FROM ibwf_rooms WHERE static='0'"));
if($prooms[0]<10)
{
$pic = mysql_escape_string($_POST["pic"]);
$pic = htmlspecialchars($pic);
$res = mysql_query("INSERT INTO ibwf_rooms SET name='".$rname."', pass='".$rpass."', censord='".$cns."', static='0', lastmsg='".time()."', pic='".$pic."'");[/php]
e nella tabella rooms gli ho aggiunto: pic varchar(255) default=""
Il problema è che l'immagine casuale
[php]$ilink = "<img src="../images/logo.gif" alt=""/>";[/php]
non si vede, e se c'è la aggiungo io, si vede solo nel database, ma no in stanza, e poi non si vede neanche l'immagine da inserire[php]$ilink = "<img src="../uploaded/files/$ilink" alt="*"/>";[/php]
dove sta l'errore? -
RE: aiuto traduzione data
si ho capito come, avevo provato, come vedi per i giorni ho ottenuto il risultato che volevo ma con i mesi mi ha sempre fatto errore purtroppo, sicuramente sbaglio qualcosa, potresti farmi un esempio per favore?
-
RE: aiuto traduzione data
la variabile $lv è il richiamo a 'last visit' (ultima visita)..:)
-
aiuto traduzione data
ciao a tutti, ho un problema a completare la traduzione della data in questo script :
[PHP]mysql_query("INSERT INTO lastview SET lastview='".$lv."', whonick='".$whonick."', ltime='".time()."'");
$sql= mysql_query("SELECT lastview,ltime FROM lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC");
$counter=0;
while($row = mysql_fetch_array($sql)){
if($counter<10){
echo "ultima visita da $row[0] ";
$newtime =$row[1]+(0 *60 *60);
$day = date("D",$newtime);
if($day=="Mon"){
$day = "Lun";
}else if($day=="Tue"){
$day = "Mar";
}else if($day=="Wed"){
$day = "Mer";
}else if($day=="Thu"){
$day = "Gio";
}else if($day=="Fri"){
$day = "Ven";
}else if($day=="Sat"){
$day = "Sab";
}else if($day=="Sun"){
$day = "Dom";
}
echo "<b>$day ".date("d M y - H:i:s ",$newtime)."</b><br/>";
echo "------------<br />";
$counter++;
}
}
[/PHP]
ho tradotto il giorno ma con il mese non riesco il risultato finale dovrebbe essere cosi... ultima visita da pincopallino Ven 13 Ago 10 - 22:06:54 grazie a chi vorra' aiutarmi -
RE: Immagine non si vede
darkita, lo script non manda il link, ecco perchè non si vede.. è come se non ci metto immagine..
-
RE: Immagine non si vede
Darkita non lo fatto io.. io tutti i codici li ho messi qua nel post.. se devo verificare, posso solo vedere qua in questi codici..
Ah l'unico script da verificare è il mio upload, perchè li carico la le immagini
[php]$usr = getnick_uid($row[uid]);
echo "<a href="./files/$row[filename]">$row[filename]</a> ($row[filesize]) Caricato il: $row[date] By <a href="../web/index.php?action=viewuser&who=$row[uid]&sid=$sid">$usr</a> <br/>";[/php] -
RE: Immagine non si vede
Capito qundi devo cambiare solo questo giusto?
[PHP]}else{
$ilink = "<img src="$ilink" alt="*"/>";
}[/PHP]
e fare come hai fatto tu.. -
RE: Immagine non si vede
darkita, cos'è il valore src? Puoi farmi un esempio semplice e pratico di quello che dici?:?
Questo è un esempio delle tante immagini:
h ttp://universal3000.altervista.org/chat_universal2/uploaded/files/pixie_02..jpg -
RE: Immagine non si vede
darkita non so se il valore è corretto, quale dovrebbe essere? Poi io quando metto immagine faccio copia incolla, faccio salva, ma l'immagine non si vede.. credo che qualche valore sarà sbagliato..
-
RE: Immagine non si vede
Si esatto darkita, ma non capisco perchè non si vede l' immagine.. rimane caricata..