Jump to content

Trium918

Members
  • Posts

    883
  • Joined

  • Last visited

Everything posted by Trium918

  1. 2 hrs. Also would a loop be necessary for multiple challenges
  2. I'm sorry about that, but to answer your question yes. The challenge is targeted at specific users.
  3. I'm trying to allow the user to accept/decline challenges from other users through submit buttons. I have it where the initial user submit his or her challenge to the database, but how do I go about retrieving the data from the database and sending it to user who is being challenged, so that they are allowed to accept or decline? I just need to be pointed in the right direction, thanks.
  4. Contact me for details.
  5. // would this be consider short hand coding in JavaScript or not? var History = function() { var self = this; var args = arguments; $(function(){ self.init.apply(self, args); }); };
  6. I am having problems writing to the file called logs.
  7. <?php class FileStorage { function FileStorage($path, $shoutLog = false) { $this->shoutLog = $shoutLog; $folder = 'logs'; if (!is_dir($folder)) $folder = '../' . $folder; if (!is_dir($folder)) $folder = '../' . $folder; $this->path = $folder . '/' . $path . '.txt'; } function open($lock = false) { $this->handle = fopen($this->path, 'a+'); if ($lock) { $this->lock(); return $this->load(); } } function close(&$array) { if (isset($array)) $this->save($array); $this->unlock(); fclose($this->handle); unset($this->handle); } function load() { if (($contents = $this->read($this->path)) == null) return $this->resetArray(); return unserialize($contents); } function save(&$array, $unlock = true) { $contents = serialize($array); $this->write($contents); if ($unlock) $this->unlock(); } function unlock() { if (isset($this->handle)) flock($this->handle, LOCK_UN); } function lock() { if (isset($this->handle)) flock($this->handle, LOCK_EX); } function read() { fseek($this->handle, 0); //return stream_get_contents($this->handle); return file_get_contents($this->path); } function write($contents) { ftruncate($this->handle, 0); fwrite($this->handle, $contents); } function resetArray() { if ($this->shoutLog) $default = array( 'info' => array( 'latestTimestamp' => -1 ), 'posts' => array() ); else $default = array(); $this->save($default, false); return $default; } } ?> Here is the complete class. I am trying to figure out why this class isn't writing to the log file.
  8. <?php class FileStorage { function FileStorage($path, $shoutLog = false) { $this->shoutLog = $shoutLog; $folder = 'logs'; if (!is_dir($folder)) $folder = '../' . $folder; if (!is_dir($folder)) $folder = '../' . $folder; $this->path = $folder . '/' . $path . '.txt'; } $show_path= new FileStorage; echo $show_path ->FileStorage(); ?> What is the correct way to call the class FileStorage's object? I am trying to test the class to see if it is working.
  9. Where would you start? I would like to write my own as my first real project.
  10. Ok, something happen. I am not able to log into the control panel after changing all short tags.
  11. I need help installing yshout 5.
  12. Thanks! I was searching shout box only without the php...
  13. Where can I found a shout box or do I have to write one myself?
  14. What are somethings that I can do to improve this code? Thanks..
  15. <form name=matchSelect method=post action=post.php onSubmit="if(this.amount=='Amount $') {alert('You must specify an amount!'); return false;} "> <select name="systems" onChange="updategamesmatchSelect(this.selectedIndex)" style="width: 150px" class="tourn_input" id="console"> <option>Select A Console</option> <option value="6" >Nintendo Wii</option> <option value="7" >PC</option> <option value="3" >Playstation 3</option> <option value="15" >Playstation 4</option> <option value="5" >Xbox 360</option> <option value="16" >XBox One</option> </select><select name="game" style="width:170px" class="tourn_input" id="game_input"> </select> <script type="text/javascript">var systemlistmatchSelect=document.matchSelect.systems var gameslistmatchSelect=document.matchSelect.game var gamesmatchSelect=new Array() gamesmatchSelect[0]="" gamesmatchSelect[1]=["Mario Kart Wii|987"]; gamesmatchSelect[2]=["Call of Duty: Black Ops II |1695","Dota 2|1737","FIFA 13|1718","League of Legends|1705","Starcraft II|1429","Team Fortress 2|1156"]; gamesmatchSelect[3]=["Battlefield 4|1729","Call of Duty Ghosts|1733","Call of Duty: Black Ops II |1693","FIFA 13|1685","FIFA 14|1725","Grand Theft Auto V|1731","Injustice: Gods Among Us|1711","Madden NFL 13|1678","Madden NFL 25|1721","Major League Baseball 2K13|1700","MLB 13: The Show|1702","Mortal Kombat vs DC Universe|1146","NBA 2K13|1687","NBA 2K14|1727","NCAA Football 13|1672","NCAA Football 14|1716","NHL 13|1681","NHL 14|1723","Pro Evolution Soccer 2014|1750","Street Fighter IV|1167","Tekken Tag Tournament 2 |1683","Tiger Woods PGA Tour 14 |1707","WWE 2K14|1735"]; gamesmatchSelect[4]=["Battlefield 4|1741","Call of Duty Ghosts|1739","FIFA 14|1745","Injustice: Gods Among Us Ultimate Edition|1755","Madden NFL 25|1738","NBA 2K14|1743","NBA Live 14|1748","Need For Speed Rivals|1756"]; gamesmatchSelect[5]=["Battlefield 4|1730","Call of Duty Ghosts|1734","Call of Duty: Black Ops II |1694","FIFA 13|1686","FIFA 14|1726","Grand Theft Auto V|1732","Halo 4|1692","Injustice: Gods Among Us|1712","Madden NFL 13|1679","Madden NFL 25|1722","Major League Baseball 2K13|1701","Mortal Kombat vs DC Universe|1147","NBA 2K13|1688","NBA 2K14|1728","NCAA Football 13|1673","NCAA Football 14|1717","NHL 13|1682","NHL 14|1724","Pro Evolution Soccer 2014|1751","Street Fighter IV|1168","Tekken Tag Tournament 2 |1684","Tiger Woods PGA Tour 14 |1708","WWE 2K14|1736"]; gamesmatchSelect[6]=["Battlefield 4|1742","Call of Duty Ghosts|1740","FIFA 14|1746","Forza Motorsport 5|1754","Madden NFL 25|1747","NBA 2K14|1744","NBA Live 14|1749","Need For Speed Rivals|1757"]; function updategamesmatchSelect(selectedgamesgroup){ gameslistmatchSelect.options.length=0 if (selectedgamesgroup>0){ for (i=0; i<gamesmatchSelect[selectedgamesgroup].length; i++) gameslistmatchSelect.options[gameslistmatchSelect.options.length]=new Option(gamesmatchSelect[selectedgamesgroup][i].split("|")[0], gamesmatchSelect[selectedgamesgroup][i].split("|")[1]) } } </script> <input name="amount" value="Amount $" size="8" maxlength="10" class="tourn_input" onFocus="this.className='tourn_input_focus'; if (this.value='Amount $') { this.value=''};" onBlur="this.className='tourn_input'"/><p style="padding:12px 0 0 0;">Comments:</P><textarea name="comments" rows="3" cols="57" class="tourn_input" id="comments" onFocus="this.className='tourn_input_focus'; if (this.value='Use this box to talk about rules, game play settings, preferred game time and availability. (i.e., Prefer to play Monday from 2-4 p.m.)') { this.value=''};" onBlur="this.className='tourn_input'">Use this box to talk about rules, game play settings, preferred game time and availability. (i.e., Prefer to play Monday from 2-4 p.m.)</textarea><br><input name=recipient value='BUMPGOOD904' type=hidden class=button /><input type='hidden' name='subject' value='Superian has challenged you.' class="button" /><p style="padding:12px 0 0 0;"> <input type="image" src='images/but_send_challenge.gif' class="button" onmouseover="this.src='images/but_send_challenge_ON.gif'" onmouseout="this.src='images/but_send_challenge.gif'" /> </p> </form> I am needing someone to point me in the right direction. I am trying to use Ajax to populate the drop down menu similar to what the programmer used in the code above. Correct me if I am wrong, but wouldn't the site load faster if the data for the (gamematchSelect) array is stored and pulled from the database? I just need to know how to populate the second drop down menu after the first Select Console is selected which is generated by the updategamesmatchSelect function when called.
  16. Hey, I'm looking for a good site that has stocked images such as headers, comment images, buttons etc..... Thanks!
  17. Trium918

    Help!

    phpfreaks has changed since the last time I have been on here. It's been some time, but I have a quick queston for you all. On the home page of phpfreaks I noticed that the navagation loads into the same content div or whatever while the remaining of the site remains static. What is this called and could you all lead me into the right direction? Thanks!
  18. No mixtapes are free. http://livemixtapes.com
  19. The site that I am building is equivalent to http://livemixtapes.com. To my understanding, the music files or store on their server.
  20. I've search google and found bit and pieces of code, but unfortunately my head is still cloudy. I am looking for someone to point me in the right direction. I am going to attempt to write a php script that will allow the user to download free music such http://www.livemixtapes.com which is using php as well. I am looking for functions, headers, and whatever else I would need to complete this task of mines. How to step up structure of the <dir> etc... Thanks.
  21. I was wondering was a website's logo copyrighted by default, or do I have to go through some type of legal process to get it copyrighted? I would like to do more with the logo like printing it to some t-shirts for profit. Can someone shine some light on this and point me in the right direction?
  22. What is the specific name for an oval shaped edges layout for the background of a web page?
  23. U.S. Government Wants To Tap Into All Your Computers & Delete Any Copyrighted Material You May Have. What do you all think about this? Do you think that this is true? Link below: http://www.youtube.com/watch?v=AGHKPWmCPPo&feature=player_embedded
×
×
  • 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.