
Draco
Members-
Posts
29 -
Joined
-
Last visited
Never
Draco's Achievements
Newbie (1/14)
0
Reputation
-
Re: Contact Staff Form [FREE] This is for players to mail staff. ------------------------------------ You did copy that code and saved it in a file as cstaff.php correct? If not find the line: <form action='cstaff.php' method='post'> Change cstaff.php to whatever you named the file ------------------------------------ As for v2 conversion.....I have never seen v2 code, can't help there...
-
Re: is it me or? There is probably at least 100 different ways you code that and have the same identical output of the page.
-
Re: PHP Configuration? well problem fixed, guess since the panel sucks any edits i want to do I gotta do locally and upload them, no biggy I guess.... Delete old file, upload new, restart server. . . and its all good now!
-
Re: PHP Configuration? Well according to the file list write permissions are setup for me, however I can't find anywhere to do so, tried using fopen and writing that way but access is denied because of the files location. Yeah the panel for it sucks, guess I'm gonna have to shell out some more cash for the cpanel version, cuz the current one sucks ass.
-
Re: PHP Configuration? I know what I need to change, and what file. The problem is that it won't let me open the file and edit it live, nor will it let me download it, edit it, and then upload again. Wanted to know if there was any thing I could to change it via ssh conncetion. . . . hmmmmm. . . . I wonder if I can delete and create a new file. . . . . . . I'll try that out in a bit!
-
Anyone know how to configure PHP on a server. Mine has display_errors shut off and I want it on. Right now if there is a syntax error it just displays a blank page. Its on a Virtual Dedicated Server, I have SSH connection. .
-
Copy the following and save it as cstaff.php This produces a form that has a select list of all members with a user_level greater than 1, the list is ordered by user_level. Subject of mail is set to "Staff contact form". <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); if($_POST['go']) { $to = (int) $_POST['staff']; $_POST['text'] = strip_tags($_POST['text']); $msg = str_replace(array("\n"),array(" "),htmlentities($_POST['text'])); mysql_query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'Staff contact form','$msg')",$c) or die(mysql_error()); print "Your mail to the selected staff member has been sent. Please allow 24 hours for a response to be returned. Thank You. "; } else { $q=mysql_query("SELECT * FROM users WHERE user_level > 1 ORDER BY user_level",$c); print "[b]Contact Staff[/b] Staff Member: "; while($z=mysql_fetch_array($q)) { print "{$z['username']}"; } print " Message to staff member: Send a mail to the selected staff member "; } $h->endpage(); ?> *edit to change filename
-
Re: Counting (nr game) 1350
-
Re: Getting Rid of the 2.147 bil cap in MCcode Well I'm not a game owner so I can't really give you a reason why, but I can speculate that over time it does become necceasry to go beyond the 2.xx billion limit.
-
Re: Getting Rid of the 2.147 bil cap in MCcode bigint Integer (whole number) -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807 (with default attributes setting) Set the attributes to unsigned and it changes this to a range of 0 through 18,446,744,073,709,551,614
-
Re: Glad to be here. . . Thank you for the warm welcome Scarlet. I know not all are under 20, i code for one whom is over 30. Like I've always thought, age is just a number that people use to judge you with. I have dealt with many individuals 10 years younger than me that blew me away with their knowledge and maturity. A number means nothing to me, nor should it mean anything to others, its about how you present yourself and the dedication to the task at hand.
-
EXP level goes past 100% and breaks design
Draco replied to Jamie Taylor - Director of's topic in General Discussion
Re: EXP level goes past 100% and breaks design around this line somewhere. . . $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); I don't own a version of mc codes, but that line is from the header of mccodes lite, can somebody else give better detail? -
Re: Markets! I wrote this little bit to clear out a item market, could be used as a cron also $q=mysql_query("SELECT * FROM itemmarket",$c); while($r=mysql_fetch_array($q)) { mysql_query("INSERT INTO inventory VALUES('',{$r['imITEM']},{$r['imADDER']},1,0)",$c) or die(mysql_error()); mysql_query("DELETE FROM itemmarket WHERE imID={$r['imID']}",$c); }
-
EXP level goes past 100% and breaks design
Draco replied to Jamie Taylor - Director of's topic in General Discussion
Re: EXP level goes past 100% and breaks design correct, it will (should) always right itself with a few page rerfreshes -
EXP level goes past 100% and breaks design
Draco replied to Jamie Taylor - Director of's topic in General Discussion
Re: EXP level goes past 100% and breaks design in theory $expneeded shouldn't exceed 100%, it should always equal 100%. I may be wrong, but if $exp > $expneeded, then do the leveling stuff. . . with each level gained $expneeded raises for that account which creates a new 100% mark for that account. Just a note, i know $expneeded can be greater than 100 but I was using it like a percent. Basically calling $expneeded=100% of experience needed to level, so if $exp > $expneeded that means the $exp is greater than 100% of $expneeded. If I actually had the mc codes I could probably explain it more than what I did. It appears you have them so +1 on the assist ;) Both examples yield the same results, i think (not tested). Mine is just more generic, yours looks more workable on a live system