Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by blacknight

  1. what date for mat does your NOW() function spit out...
  2. "SELECT COUNT(`id`) FROM `cysticBlogs` WHERE `Author` = '".$auth."' && `date` = NOW() && `status` = 'active'"; to "SELECT COUNT(`id`) as `count FROM `cysticBlogs` WHERE `Author` = '".$auth."' && `date` = NOW() && `status` = 'active'"; if($result['COUNT(`id`)'] > 3) { to if($result['count'] > 3) that should do it ...
  3. after echo "Whoops! You can only write three blogs per day due to spam"; return; most like ly it will stop the script send send a finish tokem back for the function
  4. i dono if you have solved this issue or not so try this function valid_credentials($user, $pass) { $user = mysql_real_escape_string($user); $pass = sha1($pass); $total = mysql_query("SELECT `user_name`, `user_password` FROM `user_tbl` WHERE `user_name` = '".$user."' AND `user_password` = '"$pass"'"); return (mysql_result($total, 0) == '1') ? true : false; } //adds user to the database function add_user($user, $pass) { $user = mysql_real_escape_string(htmlentities($user)); $pass = sha1($pass); $q = mysql_query("INSERT INTO `user_tbl` SET ('user_name', 'user_password') VALUES ('".$user."', '".$pass."')"); $result = mysql_result($q); return $result; }
  5. try using BINARY SELECT `sid`, `sbody`, `stitle`, `sdescription` FROM `simple_search` WHERE BINARY `stitle` LIKE '%the%' ORDER BY `stitle` LIMIT 10;
  6. i solved it used where clasuse `rep`.`name` = 'rep name' OR `rep`.`name` IS NULL
  7. the title if this is the best i could do i think because im lost in what i need to do .. theres the info .. The main query left joins 5 tables one of these tables may or may not have data in it (here inlies my issue) this is the query.. SELECT `members`.`member_id`, `members`.`name`, `members`.`class`, `members`.`classid`, `members`.`level`, `members`.`zone`, `members`.`online`, `members`.`last_online`, UNIX_TIMESTAMP(`members`.`last_online`) AS 'last_online_stamp', DATE_FORMAT( DATE_ADD(`members`.`last_online`,INTERVAL 0 HOUR ),'%a %b %D,%l:%i %p' ) AS 'last_online_format', `members`.`note`, `members`.`guild_title`, `alts`.`main_id`, `guild`.`update_time`, `guild`.`factionEn`, IF( `members`.`note` IS NULL OR `members`.`note` = '',1,0 ) AS 'nisnull', `members`.`officer_note`, IF( `members`.`officer_note` IS NULL OR `members`.`officer_note` = '',1,0 ) AS 'onisnull', `rep`.`curr_rep`, `rep`.`max_rep`, `rep`.`AtWar`, `rep`.`Standing`, `rep`.`name` AS 'repname', IF( `rep`.`Standing` IS NULL OR `rep`.`Standing` = '',1,0 ) AS `repisnull`, `members`.`guild_rank`, `players`.`server`, `players`.`race`, `players`.`sex`, `players`.`exp`, `players`.`clientLocale`, `players`.`lifetimeRankName`, `players`.`lifetimeHighestRank`, IF( `players`.`lifetimeHighestRank` IS NULL OR `players`.`lifetimeHighestRank` = '0',1,0 ) AS 'risnull', `players`.`hearth`, IF( `players`.`hearth` IS NULL OR `players`.`hearth` = '',1,0 ) AS 'hisnull', UNIX_TIMESTAMP( `players`.`dateupdatedutc`) AS 'last_update_stamp', DATE_FORMAT( DATE_ADD(`players`.`dateupdatedutc`,INTERVAL 0 HOUR ),'%a %b %D,%l:%i %p' ) AS 'last_update_format', IF( `players`.`dateupdatedutc` IS NULL OR `players`.`dateupdatedutc` = '',1,0 ) AS 'luisnull', GROUP_CONCAT( DISTINCT CONCAT( `proftable`.`skill_name` ,'|',`proftable`.`skill_level` ) ORDER BY `proftable`.`skill_order`) as professions, GROUP_CONCAT( DISTINCT CONCAT( `talenttable`.`build`,'|',`talenttable`.`tree` ,'|',`talenttable`.`pointsspent` ,'|',`talenttable`.`background` ) ORDER BY`talenttable`.`build`,`talenttable`.`order`) AS 'talents' FROM `roster_members` AS members LEFT JOIN `roster_players` AS players ON `members`.`member_id` = `players`.`member_id` LEFT JOIN `roster_skills` AS proftable ON `members`.`member_id` = `proftable`.`member_id` LEFT JOIN `roster_talenttree` AS talenttable ON `members`.`member_id` = `talenttable`.`member_id` LEFT JOIN `roster_addons_memberslist_alts` AS alts ON `members`.`member_id` = `alts`.`member_id` LEFT JOIN `roster_guild` AS guild ON `members`.`guild_id` = `guild`.`guild_id` LEFT JOIN `roster_reputation` AS rep ON `members`.`member_id` = `rep`.`member_id` WHERE (`members`.`guild_id` = "11" ) GROUP BY `members`.`member_id` ORDER BY IF(`members`.`member_id` = `alts`.`member_id`,1,0),`members`.`guild_rank` ASC,`members`.`level` DESC,`members`.`name` ASC LIMIT 0,75 i know its a lota code huh this displayes the proper settings but `rep` is selecting random info from the table if the user has any if not its null and no info is provided. i need to select a specific collum value of `rep.`name` but doing so only shows the `members` with that data i want to show everyone else as well and have null values for them but display the info for the people that do i hope this makes sence and someone can help me ..
  8. so im worken on my site maken a menu switching from tab content to jquery and i have an issue. my menu works the way i want sub menus show proper swwitching occures for classes .. but the main content will not become visable when a li tag is clicked here is my menu code <div id="rp_menu"> <ul style="display:block"> <li class="selected" id="81" ><a href="javascript:void(0)" >Feats of Strength</a></li> <li id="95"><a href="javascript:void(0)" >Player vs. Player</a> <ul id="s95"> <li id="s165"><div class="link"><a href="javascript:void(0)" onclick="return false;">Arena</a></div></li> <li id="s14801"><div class="link"><a href="javascript:void(0)" onclick="return false;">Alterac Valley</a></div></li> <li id="s14802"><div class="link"><a href="javascript:void(0)" onclick="return false;">Arathi Basin</a></div></li> <li id="s14803"><div class="link"><a href="javascript:void(0)" onclick="return false;">Eye of the Storm</a></div></li> <li id="s14804"><div class="link"><a href="javascript:void(0)" onclick="return false;">Warsong Gulch</a></div></li> <li id="s14881"><div class="link"><a href="javascript:void(0)" onclick="return false;">Strand of the Ancients</a></div></li> <li id="s14901"><div class="link"><a href="javascript:void(0)" onclick="return false;">Wintergrasp</a></div></li> <li id="s15003"><div class="link"><a href="javascript:void(0)" onclick="return false;">Isle of Conquest</a></div></li> <li id="s15073"><div class="link"><a href="javascript:void(0)" onclick="return false;">Battle for Gilneas</a></div></li> <li id="s15074"><div class="link"><a href="javascript:void(0)" onclick="return false;">Twin Peaks</a></div></li> <li id="s15075"><div class="link"><a href="javascript:void(0)" onclick="return false;">Tol Barad</a></div></li> <li id="s15092"><div class="link"><a href="javascript:void(0)" onclick="return false;">Rated Battleground</a></div></li> </ul> </li> <li id="96" ><a href="javascript:void(0)">Quests</a> <ul id="s96" > <li id="s14861" ><a href="javascript:void(0)">Eastern Kingdoms</a></li> <li id="s14862" ><a href="javascript:void(0)">Outland</a></li> <li id="s14863" ><a href="javascript:void(0)">Northrend</a></li> <li id="s15070" ><a href="javascript:void(0)">Cataclysm</a></li> <li id="s15081" ><a href="javascript:void(0)">Kalimdor</a></li> </ul> </li> <li id="97" ><a href="javascript:void(0)">Exploration</a> <ul id="s97" > <li id="s14777" ><a href="javascript:void(0)">Eastern Kingdoms</a></li> <li id="s14778" ><a href="javascript:void(0)">Kalimdor</a></li> <li id="s14779" ><a href="javascript:void(0)">Outland</a></li> <li id="s14780" ><a href="javascript:void(0)">Northrend</a></li> <li id="s15069" ><a href="javascript:void(0)">Cataclysm</a></li> </ul> </li> <li id="155" ><a href="javascript:void(0)">World Events</a> <ul id="s155" > <li id="s156" ><a href="javascript:void(0)">Winter Veil</a></li> <li id="s158" ><a href="javascript:void(0)">Hallow's End</a></li> <li id="s159" ><a href="javascript:void(0)">Noblegarden</a></li> <li id="s160" ><a href="javascript:void(0)">Lunar Festival</a></li> <li id="s161" ><a href="javascript:void(0)">Midsummer</a></li> <li id="s162" ><a href="javascript:void(0)">Brewfest</a></li> <li id="s163" ><a href="javascript:void(0)">Children's Week</a></li> <li id="s187" ><a href="javascript:void(0)">Love is in the Air</a></li> <li id="s14941" ><a href="javascript:void(0)">Argent Tournament</a></li> <li id="s14981" ><a href="javascript:void(0)">Pilgrim's Bounty</a></li> </ul> </li> <li id="168" ><a href="javascript:void(0)">Dungeons & Raids</a> <ul id="s168" > <li id="s14805" ><a href="javascript:void(0)">The Burning Crusade</a></li> <li id="s14806" ><a href="javascript:void(0)">Lich King Dungeon</a></li> <li id="s14808" ><a href="javascript:void(0)">Classic</a></li> <li id="s14922" ><a href="javascript:void(0)">Lich King Raid</a></li> <li id="s15067" ><a href="javascript:void(0)">Cataclysm Dungeon</a></li> <li id="s15068" ><a href="javascript:void(0)">Cataclysm Raid</a></li> </ul> </li> <li id="169" ><a href="javascript:void(0)">Professions</a> <ul id="s169" > <li id="s170" ><a href="javascript:void(0)">Cooking</a></li> <li id="s171" ><a href="javascript:void(0)">Fishing</a></li> <li id="s172" ><a href="javascript:void(0)">First Aid</a></li> <li id="s15071" ><a href="javascript:void(0)">Archaeology</a></li> </ul> </li> <li id="201" ><a href="javascript:void(0)">Reputation</a> <ul id="s201" > <li id="s14864" ><a href="javascript:void(0)">Classic</a></li> <li id="s14865" ><a href="javascript:void(0)">The Burning Crusade</a></li> <li id="s14866" ><a href="javascript:void(0)">Wrath of the Lich King</a></li> <li id="s15072" ><a href="javascript:void(0)">Cataclysm</a></li> </ul> </li> </ul> </div> then this is my js code $(document).ready(function () { $("#amain div#s81").show(); //Show first tab content $('#rp_menu > ul > li > ul').hide(); $('#rp_menu ul li').click( function() { $('#amain div').hide(); $("#rp_menu > ul > li").removeClass(" selected"); //Remove any "active" class $(this).addClass(" selected"); //Add "active" class to selected tab var target2 = 's'+this.id; // Use ID-selectors to toggle a single element. $('#amain div#'+target2+'').show(); $('#rp_menu > ul > li > ul').hide(); if ($('#rp_menu > ul > li#'+this.id+' > ul')) { $('#rp_menu > ul > li#'+this.id+' > ul').show(); } }); $('#rp_menu ul li ul li').click( function() { $('#amain div').hide(); $("#rp_menu > ul > li > ul > li").removeClass(" selected"); //Remove any "active" class $(this).addClass(" selected"); //Add "active" class to selected tab var target2 = 'sub'+this.id; // Use ID-selectors to toggle a single element. $('#amain div#'+target2).show(); }); }); the contents im trying to open are in a dev id as amain any ideas?
  9. im having issues with showhide in js and i hope ajax is my answer.. i have a multilvl menu ex general option -files -settings -help stats so issue being each menu item has a assoc hidden div block BUT options has 2 hidden div's it has to revil all div's have uniqe keys and none over lap but if like the option sub menu to slide down and show the main block dev the menu in in a container call menu the hidden boxes are in a div block called main any ideas?
  10. ok we at wowroster have been using a showhide script to hide dev sontent it works great .. if your not doing what im doing... i have a list ial just post my axual code <div id="m92" class="selected" style="display:block"> <a href="#" rel="92" onclick=" showHide('92'); showHide('mm92'); return false;">General</a></div> <div id="m95" style="display:block"> <a href="#" rel="95" onclick=" showHide('95s');showHide('m95'); showHide('95');return false;">Player vs. Player</a></div> <div id="95s" style="display:none;"> <div ><a href="#" class="selected" rel="95" onclick="return false;">Player vs. Player</a></div> <div ><a href="#" rel="s165" >--Arena</a></div> <div ><a href="#" rel="s14801" >--Alterac Valley</a></div> <div ><a href="#" rel="s14802" >--Arathi Basin</a></div> <div ><a href="#" rel="s14803" >--Eye of the Storm</a></div> <div ><a href="#" rel="s14804" >--Warsong Gulch</a></div> <div ><a href="#" rel="s14881" >--Strand of the Ancients</a></div> <div ><a href="#" rel="s14901" >--Wintergrasp</a></div> <div ><a href="#" rel="s15003" >--Isle of Conquest</a></div> <div ><a href="#" rel="s15073" >--Battle for Gilneas</a></div> <div ><a href="#" rel="s15074" >--Twin Peaks</a></div> <div ><a href="#" rel="s15075" >--Tol Barad</a></div> <div ><a href="#" rel="s15092" >--Rated Battleground</a></div> </div> <div id="m96" style="display:block"> <a href="#" rel="sub96" onclick=" showHide('sub96'); showHide('m96'); showHide('mm96'); return false;">Quests</a></div> <div id="sub96" style="display:none;"> <div><a href="#" rel="96" class="selected" onclick="return false;">Quests</a></div> <div><a href="#" rel="s14861" >--Eastern Kingdoms</a></div> <div><a href="#" rel="s14862" >--Outland</a></div> <div><a href="#" rel="s14863" >--Northrend</a></div> <div><a href="#" rel="s15070" >--Cataclysm</a></div> <div><a href="#" rel="s15081" >--Kalimdor</a></div> </div> <div id="m97" style="display:block"> <a href="#" rel="sub97" onclick=" showHide('sub97'); showHide('m97'); showHide('mm97'); return false;">Exploration</a></div> <div id="sub97" style="display:none;"> <div id="rp_menu3"> <div><a href="#" rel="97" onclick="return false;">Exploration</a></div> <div><a href="#" rel="s14777" >--Eastern Kingdoms</a></div> <div><a href="#" rel="s14778" >--Kalimdor</a></div> <div><a href="#" rel="s14779" >--Outland</a></div> <div><a href="#" rel="s14780" >--Northrend</a></div> <div><a href="#" rel="s15069" >--Cataclysm</a></div> </div> </div> <div id="m155" style="display:block"> <a href="#" rel="sub155" onclick=" showHide('sub155'); showHide('m155'); showHide('mm155'); return false;">World Events</a></div> <div id="sub155" style="display:none;"> <div id="rp_menu4"> <div><a href="#" rel="155" onclick="return false;">World Events</a></div> <div><a href="#" rel="s156" >--Winter Veil</a></div> <div><a href="#" rel="s158" >--Hallow's End</a></div> <div><a href="#" rel="s159" >--Noblegarden</a></div> <div><a href="#" rel="s160" >--Lunar Festival</a></div> <div><a href="#" rel="s161" >--Midsummer</a></div> <div><a href="#" rel="s162" >--Brewfest</a></div> <div><a href="#" rel="s163" >--Children's Week</a></div> <div><a href="#" rel="s187" >--Love is in the Air</a></div> <div><a href="#" rel="s14941" >--Argent Tournament</a></div> <div><a href="#" rel="s14981" >--Pilgrim's Bounty</a></div> </div> </div> <div id="m168" style="display:block"> <a href="#" rel="sub168" onclick=" showHide('sub168'); showHide('m168'); showHide('mm168'); return false;">Dungeons & Raids</a></div> <div id="sub168" style="display:none;"> <div id="rp_menu5"> <div><a href="#" rel="168" onclick="return false;">Dungeons & Raids</a></div> <div><a href="#" rel="s14805" >--The Burning Crusade</a></div> <div><a href="#" rel="s14806" >--Lich King Dungeon</a></div> <div><a href="#" rel="s14808" >--Classic</a></div> <div><a href="#" rel="s14922" >--Lich King Raid</a></div> <div><a href="#" rel="s15067" >--Cataclysm Dungeon</a></div> <div><a href="#" rel="s15068" >--Cataclysm Raid</a></div> </div> </div> <div id="m169" style="display:block"> <a href="#" rel="sub169" onclick=" showHide('sub169'); showHide('m169'); showHide('mm169'); return false;">Professions</a></div> <div id="sub169" style="display:none;"> <div id="rp_menu6"> <div><a href="#" rel="169" onclick="return false;">Professions</a></div> <div><a href="#" rel="s170" >--Cooking</a></div> <div><a href="#" rel="s171" >--Fishing</a></div> <div><a href="#" rel="s172" >--First Aid</a></div> <div><a href="#" rel="s15071" >--Archaeology</a></div> </div> </div> <div id="m201" style="display:block"> <a href="#" rel="sub201" onclick=" showHide('sub201'); showHide('m201'); showHide('mm201'); return false;">Reputation</a> </div> <div id="sub201" style="display:none;"> <div id="rp_menu7"> <div><a href="#" rel="201" onclick="return false;">Reputation</a></div> <div><a href="#" rel="s14864" >--Classic</a></div> <div><a href="#" rel="s14865" >--The Burning Crusade</a></div> <div><a href="#" rel="s14866" >--Wrath of the Lich King</a></div> <div><a href="#" rel="s15072" >--Cataclysm</a></div> </div> </div> <div id="m81" style="display:block"> <a href="#" rel="sub81" onclick=" showHide('sub81'); showHide('m81'); showHide('mm81'); return false;">Feats of Strength</a> </div> <div id="sub81" style="display:none;"> <div id="rp_menu8"> <div><a href="#" rel="81" onclick="return false;">Feats of Strength</a></div> </div> </div> now say if some one was to click"Player vs. Player" it should hide its self and how s95 but also display a nother cont6ainer with the id of 95 but the big problem is i need s95 to stay open untill a nother main catagory like Quests is clicked.. any one have any ideas?
  11. i run a site we used recaptcha re got 10+ posts a day of teh same bs .. we now use a captcha flash puzzle with 100 dif puzzles each with 5 sizes and dif number of pices making it more hard for them any way ... as for adding recaptia in "<form name="frm_wall" method="post" action="http://www.google.com/recaptcha/api/verify" id="frm_wall">" on your wall page add a hidden input bar but more of a better way to to use imbeded functions thatw ay they cannot get the post info see this http://code.google.com/apis/recaptcha/docs/php.html how to make a php function that sends the info a lil more secure
  12. if i understand you want this <a href="architects/'AAAAA">aaaaa AAAAA</a> <a href="architects/'BBBBB">BBBBB BBBBB</a> <a href="architects/'CCCCC">CCCCC CCCCC</a> <a href="architects/'DDDDD">DDDDD DDDDD</a> if so try this .. add $pointArchArr = ''; befor wheree clause change $pointArchArr = '<a href="architects to $pointArchArr .= '<a href="architects this will peep adding new values to the string $pointArchArr and stop overwriting them if this is wrong post back with more info
  13. hey guys im hopping i can get some help, Ok im building a Guild roster and our guild is 1000 members and its a lotta data so i want to build like updating with paganation where the default query pulls the first 100 players and clicking the next button or link which ever is easier auto updates the query and pulls records 100 - 200 any ideas guys?
  14. and to bring it all togeather $i=0; foreach($otherfans as $other) { if ($i==3) break: $displayName = ucwords($other['firstname'].' '.$other['lastname']); echo '<a href="../u/'.$other['username'].'">'.$displayName.'</a>'; $i++; }
  15. add fclose($fp); to the end of your function after the while statement will close the connection..
  16. thats a good way or <?php echo (!empty($otherfans) ? "class=\"newstext\"" : "class=\"newstext pts\"" ); ?> that way if it is empty you dont get a css class error...
  17. wamp runs php as a perl module i think you can run perl scripts from the php framework...
  18. befor droping the image in to a dir try just making in in what ever dir the script is in ... $filename = $fileattt_name;
  19. ummm.. i know why its not working ... date('n') in php is month try using date("j") http://php.net/manual/en/function.date.php
  20. as far as i know send_generic is not a php function try using mail()
  21. create a table with what ever other field you wana use to identify the user and a fielf for each langrage ex: CREATE TABLE IF NOT EXISTS `roster_talenttree_data` ( `id` int(11) NOT NULL default '0', `js` tinyint(2) NOT NULL default '0', `html` tinyint(2) NOT NULL default '0', `php` tinyint(2) NOT NULL default '0', `js` tinyint(2) NOT NULL default '0', PRIMARY KEY (`id`) ) ; then use 1 for yes o is default so its no .. id can be user is or change it to varchar and be user name
  22. in the task tray icon left click php > pvp extentions > check the extentions you wana use and then restart the server
  23. that is true $get = mysql_query("SELECT SUM(balance) as total FROM members WHERE username='$user'"); $row = mysql_fetch_row($get); $row['total'] would rep the ballance total for the user
  24. the first end bracket would work where you have defined $balance it will allways set to what the last row output from your whale statement is $balance + $row['balance']; will add the total balance from all users same goes for $new_balance = $balance + $deposit; if you have it outside the last } wil it add the totals
  • 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.