Jump to content

drisate

Members
  • Posts

    805
  • Joined

  • Last visited

Everything posted by drisate

  1. Hey guys i need to turn off gzip compression for a page in order to make an upload progress bar to work. Is there a build function for that?
  2. I found the prob i had to use chmod($_SERVER['DOCUMENT_ROOT']."/admin/site/".$upload_dir.$file_name, 0755);
  3. I just noticed the chomod is not working... looks like once it's uploaded, the file is 363 and teh chomod after the move_uploaded_file is bloked
  4. Yeah thats what i tryed let me post ya the code if (move_uploaded_file($_FILES['mp3_'.$i]['tmp_name'],$_SERVER['DOCUMENT_ROOT']."/admin/site/".$upload_dir.$file_name)){ chmod($upload_dir.$file_name, 755); $mp3 = new mp3($upload_demo_dir.$filename); $mp3_1 = $mp3->extract(0,30); $newname=rand("100000", "999999"); $mp3_1->save($upload_demo_dir.$newname.$filename.'.mp3'); $insert=mysql_query("INSERT INTO `distadp_adpsite`.`artiste_mp3` (id, nom_mp3, nom_demo, num_albume)VALUES (NULL , '".$_FILES['mp3_'.$i][name]."', '$newname.mp3', '$_GET[id]')"); echo "MP3 numéro $i uploadé!.<br>"; }else{ echo "Il ya eu une éreure inconnu dans le transfère du fichier du mp3 num $i<br>"; } The chmod($upload_dir.$file_name, 755); did not solve the problem ... it looks like if i was not the unix owner of the file ... Last time i saw something like that it was with a joomla installation ...
  5. Hey guys. I am currently making an mp3 shop for a cd distributor and i am having a problem with the mp3 upload and manipulation. When i try to download the mp3 after uploading it to $upload_dir.$file_name i get a (Can't open /www/admin/site/realmp3/60sec.mp3: Permission denied) message in my FTP ... and i get a 0 sized file that failes to open. When i check in my FTP i can see the good normal size. It's like apache was bloking me to touch that file ... if (move_uploaded_file($_FILES['mp3_'.$i]['tmp_name'],$_SERVER['DOCUMENT_ROOT']."/admin/site/".$upload_dir.$file_name)){[...]
  6. Hey guys i am trying to find a way to build a large file upload progress bar and i am having a very bad time finding one that works great for php4 ... Basically i have a n auto loop file upload form. The user chooses all the stuff to upload and hits the submit button ... sometimes it can take up to 10 min before the page gives a success message ... Most of the time the users thinks it's bugged and stop in the middle. I need a progress bar that would give an over all per file upload status... Anybody have something ready for that? This would of been perfect http://pecl.php.net/package/uploadprogress But it's PHP5.2 ...
  7. ohhhhh nice ! thx bro!
  8. Hey guys i need to upload and chop an MP3 to create a 30 sec demo of the song using the apache module called PHP-FFMpeg but I never used that before. Can anybody put me on the right track on MP3 manipulation?
  9. Thanks GuiltyGear ;-) hmm ... where’s the solve button? ... And why can’t I edit my first post lol
  10. Found it Select * FROM comment, video_list where video_list.ok='1' and video_list.id=comment.com_id and comment.sort='video' and comment.categ='$_GET[categ]' order by comment.id desc limit 0,5 Thx anyway
  11. This is what i tryed Select * FROM comment where (select video_list.ok='1' where id='comment.com_id') and comment.sort='video' and comment.categ='$_GET[categ]' order by comment.id desc limit 0,5 But that returns no result ... Can anybody help me get that select working?
  12. Hey guys my brain is jaming ... I need to select the last 5 comments from the comment table if the video from where the comment is posted is set to ok ... So theres 2 tables involved ... What i did is this print ('<br><table align="center" bgcolor="#a7a7a9" border="0" cellpadding="0" cellspacing="1" height="1" width="94%"> <tr> <td class="title" cellpadding="0" colspan="2" align="middle" height="1" valign="top"> <p style="margin-top: 0pt; margin-bottom: 0pt;" align="center"><b>Last 5 comments</b></td> </tr> <tr> <td class="subtitle" bgcolor="#f6f6f6" height="1" width="20%"><center><b>Video</b></center></td> <td class="subtitle" bgcolor="#f6f6f6" height="1" width="80%"><center><b>Comment posted</b></center></td> </tr>'); $result1 = @mysql_query("Select * FROM comment where sort='video' and categ='$_GET[categ]' order by id desc limit 0,5"); while ($last_com = @mysql_fetch_array($result1)) { $result3 = @mysql_query("Select * FROM video_list where id='$last_com[com_id]'"); $last_vid = @mysql_fetch_array($result3); if ($last_vid[ok]=="1"){ print (' <tr> <td class="std1" align="left" bgcolor="#f6f6f6" height="1" width="1%" valign="top"> <table border="0" cellpadding="5" cellspacing="5" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber14"> <tr> <td align="center" width="1%"> <a href="http://f-fr.com/1/index.php?option=com_interractif&mod=1&Itemid=26&mod=video&categ='.$last_vid[categ].'&video='.$last_vid[id].'"> <img src="http://img.youtube.com/vi/'.$last_vid[url].'/'.$youtube.'.jpg" width="80"></a></td> </tr> </table> </td> <td class="std1" align="left" bgcolor="#f6f6f6" height="1" width="99%" valign="top"> <table border="0" cellpadding="3" cellspacing="3" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber13"> <tr> <td width="70%" align="left" valign="top">'.$last_com[message].'</td> <td width="30%" align="left" valign="top"> <p style="margin-top: 0; margin-bottom: 0">Date: '.$last_com['date'].'</p> <p style="margin-top: 0; margin-bottom: 0">Author: '.$last_com[by].'</td> </tr> </table> </td> </tr>'); } } print ('</table>'); But if a video in the last 5 is not set to ok it takes it out of the result ... so i end up with only 4 instead of 5
  13. Hey guys i was wandering if it was possible to make a javascript that would make a clique using the users mouss at a X, Y coord using javascript? Ex: Let say i have a link at 86, 250 how can i make it click on it? i know javascirt has a few function related to the mouss coords ... ex: <script type="text/javascript"> document.onmousedown = function(e){ var coordX = (e && e.pageX)? e.pageX : event.x; var coordY = (e && e.pageY)? e.pageY : event.y; alert('x = '+coordX+'\ny = '+coordY); } </script> So it's possible to track the mouss ... but it is possible to move it or simulate a clique at X, Y ?
  14. Yeah I understand what you’re telling me but there’s not much I can do about it. It's a world of warcraft database and the quest table can have 4 different required items, 6 different reward items to choose from or 4 reward items gave at the same time. I am remaking the item id's because custom items currently have a number with almost 7 numbers when it can actually have 6 and having them all one after an other would greatly help. I will do it this way then ... But i am facing an other problem ... the page times out before the script is done making the changes. <?php /** * @author Beaster * @Script Remake items id's */ $dbh2=mysql_connect("f-fr.servegame.com", "user", "pass") or die ('1 Erreur: '.mysql_error()); mysql_select_db("ascent"); $start='190000'; // Evrything above this will get new id's $loop=1; echo "<center><h1>Starting</h1></center><br><br>"; $check = mysql_query("SELECT * FROM `items` WHERE entry>='$start' order by entry asc") or die (mysql_error()); while ($items = mysql_fetch_array($check)) { if ($loop=="1"){$last=$start;}else{$last++;} //$update = mysql_query("UPDATE items SET old_entry='$items[entry]' where entry='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE items SET entry='$last' where entry='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE playeritems SET entry='$last' where entry='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE vendors SET item='$last' where item='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId1='$last' where ReqItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId2='$last' where ReqItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId3='$last' where ReqItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId4='$last' where ReqItemId4='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId1='$last' where RewChoiceItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId2='$last' where RewChoiceItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId3='$last' where RewChoiceItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId4='$last' where RewChoiceItemId4='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId5='$last' where RewChoiceItemId5='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId6='$last' where RewChoiceItemId6='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId1='$last' where RewItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId2='$last' where RewItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId3='$last' where RewItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId4='$last' where RewItemId4='$items[entry]'") or die (mysql_error()); echo "Item $items[entry] is now $last<br>"; $loop++; } echo "<br><br><center><h1>End</h1></center>"; ?>
  15. I can't because every row can have diffrent values ... i need to test each field to check if the value is equal to $items[entry]... Thats why i ended up by trying stuff like $update = mysql_query("UPDATE quests SET (ReqItemId1='$last' where ReqItemId1='$items[entry]'), (ReqItemId2='$last' where ReqItemId2='$items[entry]'), (ReqItemId3='$last' where ReqItemId3='$items[entry]'), (ReqItemId4='$last' where ReqItemId4='$items[entry]'), (RewChoiceItemId1='$last' where RewChoiceItemId1='$items[entry]'), (RewChoiceItemId2='$last' where RewChoiceItemId2='$items[entry]'), (RewChoiceItemId3='$last' where RewChoiceItemId3='$items[entry]'), (RewChoiceItemId4='$last' where RewChoiceItemId4='$items[entry]'), (RewChoiceItemId5='$last' where RewChoiceItemId5='$items[entry]'), (RewChoiceItemId6='$last' where RewChoiceItemId6='$items[entry]'), (RewItemId1='$last' where RewItemId1='$items[entry]'), (RewItemId2='$last' where RewItemId2='$items[entry]'), (RewItemId3='$last' where RewItemId3='$items[entry]'), (RewItemId4='$last' where RewItemId4='$items[entry]')") or die (mysql_error()); They all need to be tested like this some way ... RewItemId1='$last' where RewItemId1='$items[entry]' So they are only replaced by the new value if the current value is = to $items[entry]
  16. I tryed this $update = mysql_query("UPDATE quests SET (ReqItemId1='$last' where ReqItemId1='$items[entry]') and (ReqItemId2='$last' where ReqItemId2='$items[entry]') and (ReqItemId3='$last' where ReqItemId3='$items[entry]') and (ReqItemId4='$last' where ReqItemId4='$items[entry]')and (RewChoiceItemId1='$last' where RewChoiceItemId1='$items[entry]')and (RewChoiceItemId2='$last' where RewChoiceItemId2='$items[entry]')and (RewChoiceItemId3='$last' where RewChoiceItemId3='$items[entry]')and (RewChoiceItemId4='$last' where RewChoiceItemId4='$items[entry]')and (RewChoiceItemId5='$last' where RewChoiceItemId5='$items[entry]')and (RewChoiceItemId6='$last' where RewChoiceItemId6='$items[entry]')and (RewItemId1='$last' where RewItemId1='$items[entry]')and (RewItemId2='$last' where RewItemId2='$items[entry]')and (RewItemId3='$last' where RewItemId3='$items[entry]')and (RewItemId4='$last' where RewItemId4='$items[entry]')") or die (mysql_error()); But obviously it's not working lol I don't think that will work because i only update the field if the value is equal to $items[entry] (are you sur that works anyway lol) IDK ... php always has a way trick up his sleeves for this kind of situation. Any sugestions?
  17. Hey guys i was wandering if there was a way to put all this into 1 query $update = mysql_query("UPDATE quests SET ReqItemId1='$last' where ReqItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId2='$last' where ReqItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId3='$last' where ReqItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId4='$last' where ReqItemId4='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId1='$last' where RewChoiceItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId2='$last' where RewChoiceItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId3='$last' where RewChoiceItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId4='$last' where RewChoiceItemId4='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId5='$last' where RewChoiceItemId5='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId6='$last' where RewChoiceItemId6='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId1='$last' where RewItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId2='$last' where RewItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId3='$last' where RewItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId4='$last' where RewItemId4='$items[entry]'") or die (mysql_error());
  18. Hey guys i made a PHP loop script to make an update on a very very very big database ... The script is supose to remake entry id's bigger then 190000 but the it is used un more then one table so i had to The table looks like this [code=php:0]CREATE TABLE /*!32312 IF NOT EXISTS*/ "items" ( "entry" int(10) NOT NULL DEFAULT '0', "class" int(10) NOT NULL DEFAULT '0', "subclass" int(10) NOT NULL DEFAULT '0', "field4" int(10) NOT NULL DEFAULT '-1', "name1" varchar(255) NOT NULL DEFAULT '', "name2" varchar(255) NOT NULL DEFAULT '', "name3" varchar(255) NOT NULL DEFAULT '', "name4" varchar(255) NOT NULL DEFAULT '', "displayid" int(10) NOT NULL DEFAULT '0', "quality" int(10) NOT NULL DEFAULT '0', "flags" int(10) NOT NULL DEFAULT '0', "buyprice" int(10) NOT NULL DEFAULT '0', "sellprice" int(10) NOT NULL DEFAULT '0', "inventorytype" int(10) NOT NULL DEFAULT '0', "allowableclass" int(10) NOT NULL DEFAULT '-1', "allowablerace" int(10) NOT NULL DEFAULT '-1', "itemlevel" int(10) NOT NULL DEFAULT '0', "requiredlevel" int(10) NOT NULL DEFAULT '0', "RequiredSkill" int(10) NOT NULL DEFAULT '0', "RequiredSkillRank" int(10) NOT NULL DEFAULT '0', "RequiredSkillSubRank" int(10) NOT NULL DEFAULT '0', "RequiredPlayerRank1" int(10) NOT NULL DEFAULT '0', "RequiredPlayerRank2" int(10) NOT NULL DEFAULT '0', "RequiredFaction" int(10) NOT NULL DEFAULT '0', "RequiredFactionStanding" int(10) NOT NULL DEFAULT '0', "Unique" int(10) NOT NULL DEFAULT '0', "maxcount" int(10) NOT NULL DEFAULT '0', "ContainerSlots" int(10) NOT NULL DEFAULT '0', "stat_type1" int(10) NOT NULL DEFAULT '0', "stat_value1" int(11) NOT NULL DEFAULT '0', "stat_type2" int(10) NOT NULL DEFAULT '0', "stat_value2" int(11) NOT NULL DEFAULT '0', "stat_type3" int(10) NOT NULL DEFAULT '0', "stat_value3" int(11) NOT NULL DEFAULT '0', "stat_type4" int(10) NOT NULL DEFAULT '0', "stat_value4" int(11) NOT NULL DEFAULT '0', "stat_type5" int(10) NOT NULL DEFAULT '0', "stat_value5" int(11) NOT NULL DEFAULT '0', "stat_type6" int(10) NOT NULL DEFAULT '0', "stat_value6" int(11) NOT NULL DEFAULT '0', "stat_type7" int(10) NOT NULL DEFAULT '0', "stat_value7" int(11) NOT NULL DEFAULT '0', "stat_type8" int(10) NOT NULL DEFAULT '0', "stat_value8" int(11) NOT NULL DEFAULT '0', "stat_type9" int(10) NOT NULL DEFAULT '0', "stat_value9" int(11) NOT NULL DEFAULT '0', "stat_type10" int(10) NOT NULL DEFAULT '0', "stat_value10" int(11) NOT NULL DEFAULT '0', "dmg_min1" float NOT NULL DEFAULT '0', "dmg_max1" float NOT NULL DEFAULT '0', "dmg_type1" int(10) NOT NULL DEFAULT '0', "dmg_min2" float NOT NULL DEFAULT '0', "dmg_max2" float NOT NULL DEFAULT '0', "dmg_type2" int(10) NOT NULL DEFAULT '0', "dmg_min3" float NOT NULL DEFAULT '0', "dmg_max3" float NOT NULL DEFAULT '0', "dmg_type3" int(10) NOT NULL DEFAULT '0', "dmg_min4" float NOT NULL DEFAULT '0', "dmg_max4" float NOT NULL DEFAULT '0', "dmg_type4" int(10) NOT NULL DEFAULT '0', "dmg_min5" float NOT NULL DEFAULT '0', "dmg_max5" float NOT NULL DEFAULT '0', "dmg_type5" int(10) NOT NULL DEFAULT '0', "armor" int(10) NOT NULL DEFAULT '0', "holy_res" int(10) NOT NULL DEFAULT '0', "fire_res" int(10) NOT NULL DEFAULT '0', "nature_res" int(10) NOT NULL DEFAULT '0', "frost_res" int(10) NOT NULL DEFAULT '0', "shadow_res" int(10) NOT NULL DEFAULT '0', "arcane_res" int(10) NOT NULL DEFAULT '0', "delay" int(10) NOT NULL DEFAULT '0', "ammo_type" int(10) NOT NULL DEFAULT '0', "range" float NOT NULL DEFAULT '0', "spellid_1" int(10) NOT NULL DEFAULT '0', "spelltrigger_1" int(10) NOT NULL DEFAULT '0', "spellcharges_1" int(11) NOT NULL DEFAULT '0', "spellcooldown_1" int(11) NOT NULL DEFAULT '0', "spellcategory_1" int(10) NOT NULL DEFAULT '0', "spellcategorycooldown_1" int(11) NOT NULL DEFAULT '0', "spellid_2" int(10) NOT NULL DEFAULT '0', "spelltrigger_2" int(10) NOT NULL DEFAULT '0', "spellcharges_2" int(11) NOT NULL DEFAULT '0', "spellcooldown_2" int(11) NOT NULL DEFAULT '0', "spellcategory_2" int(10) NOT NULL DEFAULT '0', "spellcategorycooldown_2" int(11) NOT NULL DEFAULT '0', "spellid_3" int(10) NOT NULL DEFAULT '0', "spelltrigger_3" int(10) NOT NULL DEFAULT '0', "spellcharges_3" int(11) NOT NULL DEFAULT '0', "spellcooldown_3" int(11) NOT NULL DEFAULT '0', "spellcategory_3" int(10) NOT NULL DEFAULT '0', "spellcategorycooldown_3" int(11) NOT NULL DEFAULT '0', "spellid_4" int(10) NOT NULL DEFAULT '0', "spelltrigger_4" int(10) NOT NULL DEFAULT '0', "spellcharges_4" int(11) NOT NULL DEFAULT '0', "spellcooldown_4" int(11) NOT NULL DEFAULT '0', "spellcategory_4" int(10) NOT NULL DEFAULT '0', "spellcategorycooldown_4" int(11) NOT NULL DEFAULT '0', "spellid_5" int(10) NOT NULL DEFAULT '0', "spelltrigger_5" int(10) NOT NULL DEFAULT '0', "spellcharges_5" int(11) NOT NULL DEFAULT '0', "spellcooldown_5" int(11) NOT NULL DEFAULT '0', "spellcategory_5" int(10) NOT NULL DEFAULT '0', "spellcategorycooldown_5" int(11) NOT NULL DEFAULT '0', "bonding" int(10) NOT NULL DEFAULT '0', "description" varchar(255) NOT NULL DEFAULT '', "page_id" int(10) NOT NULL DEFAULT '0', "page_language" int(10) NOT NULL DEFAULT '0', "page_material" int(10) NOT NULL DEFAULT '0', "quest_id" int(10) NOT NULL DEFAULT '0', "lock_id" int(10) NOT NULL DEFAULT '0', "lock_material" int(10) NOT NULL DEFAULT '-1', "sheathID" int(10) NOT NULL DEFAULT '0', "randomprop" int(30) NOT NULL DEFAULT '0', "unk203_1" int(10) NOT NULL DEFAULT '0', "block" int(10) NOT NULL DEFAULT '0', "itemset" int(10) NOT NULL DEFAULT '0', "MaxDurability" int(10) NOT NULL DEFAULT '0', "ZoneNameID" int(10) NOT NULL DEFAULT '0', "mapid" int(10) NOT NULL DEFAULT '0', "bagfamily" int(10) NOT NULL DEFAULT '0', "TotemCategory" int(10) NOT NULL DEFAULT '0', "socket_color_1" int(10) NOT NULL DEFAULT '0', "unk201_3" int(10) NOT NULL DEFAULT '0', "socket_color_2" int(10) NOT NULL DEFAULT '0', "unk201_5" int(10) NOT NULL DEFAULT '0', "socket_color_3" int(10) NOT NULL DEFAULT '0', "unk201_7" int(10) NOT NULL DEFAULT '0', "socket_bonus" int(10) NOT NULL DEFAULT '0', "GemProperties" int(10) NOT NULL DEFAULT '0', "ItemExtendedCost" int(10) NOT NULL DEFAULT '0', "ArenaRankRequirement" int(30) NOT NULL DEFAULT '0', "ReqDisenchantSkill" int(10) NOT NULL DEFAULT '0', "unk2" int(10) NOT NULL DEFAULT '0', PRIMARY KEY ("entry") ) /*!40100 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci*/; [/code] and my php script looks like this [code=php:0]<?php /** * @author Beaster * @Script Remake items id's */ $dbh2=mysql_connect("localhost", "user", "pass") or die ('1 Erreur: '.mysql_error()); mysql_select_db("ascent"); $start='190000'; // Evrything above this will get new id's $loop=1; echo "<center><h1>Starting</h1></center><br><br>"; $check = mysql_query("SELECT * FROM `items` WHERE entry>='$start' order by entry asc") or die (mysql_error()); while ($items = mysql_fetch_array($check)) { if ($loop=="1"){$last=$start;}else{$last++;} $update = mysql_query("UPDATE items SET entry='$last' where entry='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE playeritems SET entry='$last' where entry='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE vendors SET item='$last' where item='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId1='$last' where ReqItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId2='$last' where ReqItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId3='$last' where ReqItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET ReqItemId4='$last' where ReqItemId4='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId1='$last' where RewChoiceItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId2='$last' where RewChoiceItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId3='$last' where RewChoiceItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId4='$last' where RewChoiceItemId4='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId5='$last' where RewChoiceItemId5='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewChoiceItemId6='$last' where RewChoiceItemId6='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId1='$last' where RewItemId1='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId2='$last' where RewItemId2='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId3='$last' where RewItemId3='$items[entry]'") or die (mysql_error()); $update = mysql_query("UPDATE quests SET RewItemId4='$last' where RewItemId4='$items[entry]'") or die (mysql_error()); echo "Item $items[entry] is now $last<br>"; $loop++; } echo "<br><br><center><h1>End</h1></center>"; ?> [/code] But for some reason the page is not loading at all ... not even the echo "<center><h1>Starting</h1></center><br><br>"; part ... it's not the first time i build a loop script for a big database ... but it's the first time i get this problem. Is there a way to do all this into one super SQL query i could execute?
  19. The problem is ... your not asking for help ... you asking for somebody to do it for you. And unless you would like to buy the service of a programmer i don't think anybody will really help on this. phpfreaks.com is abbout helping pepol ready to actuly try to understand and learn. Ask a question on a buged script and we can help you ... as a question on how to do something ... we can also help you ... but ask us to do it for you ... now you lose us. What i would do in your position is add a new feild called "ok" in your user table and depending on the way the login script is made check if ok is = to 1. If it is gon on with the loging if not show a message. Now in your admin section you probably have a list of members. When you clique on them theres probably a profile. You should add in there a form that appears if the session is an admin session. something simple like a dropdown menu with accept/refuse. then you send the form in to the same page using a new $_GET var. in your source you if the $_GET var is active you somply update the members profile with the value of the posted field. Something like that <?php if ($_GET[mod]=="1"){ $update=mysql_query("UPDATE users SET ok='$_POST[check]' where userid='$_GET[userid]") or die (mysql_error()); if ($_POST[check]=="1"){ echo "Member accepted"; }else{ echo "Member refused"; } }else{ ?> <form method="POST" action="<?php echp $PHP_SELF?mod=1&userid=$_GET[id]; ?>"><p> <select size="1" name="check"> <option value="1">ok</option> <option value="0">Refuse</option> </select> <input type="submit" value="Submit" name="send"></p> </form> <?php } ?>
  20. Hey guys ... i am creating a voting system. The user gets on a page where theres an iframe on a top100 list that i don't controle. The user needs to enter the catcha image. Is it possible to detect if the iframe loaded a new page?
  21. I don't think double MD5 can cause any problem at all ... 123 to 202cb962ac59075b964b07152d234b70 202cb962ac59075b964b07152d234b70 to d9b1d7db4cd6e70935368a1efb10e377 Good luck cracking that ... hehe
  22. You should really consider using AJAX to do this ... This one is kind of cool http://www.dhtmlgoodies.com/scripts/fly-to-basket/fly-to-basket.html The download is here: http://www.dhtmlgoodies.com/index.html?whichScript=fly-to-basket
  23. Hey guys i am trying to find a way to make this <a href="images/image-3.jpg" rel="lightbox[roadtrip]">Vote now</a> Load on it self ... It's a lightbox script it works on the form of a link ... but i am trying to transform it to make it open a voting image every 10 min ... any ideas? I am using this light bos script http://www.huddletogether.com/projects/lightbox2/#example
  24. The code would look like <?php $sec="5"; echo $_POST[message]."<br><br><b>You will be redirected to $_POST[redirecturl] in 5 seconds</b>"; echo '<meta http-equiv="refresh" content="'.$sec.';url='.$_POST[redirecturl].'"/>'; ?>
  25. np good luck
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.