
HUSTLE HARD
Members-
Posts
25 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
HUSTLE HARD's Achievements
Newbie (1/14)
2
Reputation
-
Hi i am trying to add a small icon inside my svg radial progress bar..however simply adding in a img tag breaks the design. <svg height="50" width="50" class="progress blue noselect" data-progress="'.$brperc.'" viewbox="0 0 80 80"> <path class="track" d="M5,40a35,35 0 1,0 70,0a35,35 0 1,0 -70,0" /> <path class="fill" d="M5,40a35,35 0 1,0 70,0a35,35 0 1,0 -70,0" /> <text class="value" style="font-size:16px;" x="50%" y="55%">0%</text> </svg> var forEach = function (array, callback, scope) { for (var i = 0; i < array.length; i++) { callback.call(scope, i, array[i]); } }; window.onload = function(){ var max = -219.99078369140625; forEach(document.querySelectorAll('.progress'), function (index, value) { percent = value.getAttribute('data-progress'); value.querySelector('.fill').setAttribute('style', 'stroke-dashoffset: ' + ((100 - percent) / 100) * max); value.querySelector('.value').innerHTML = percent + '%'; }); } I want the end result like below..
-
I need some help, my content seems to be in place how ever when is zoom in/out it moves out of place tried all these css trick position, wrap and width fix didnt work. body { background: #1d0202 url("images/header_body.jpg") no-repeat top center; margin:0 auto; padding:0; font:13px/16px "Lucida Grande", Arial, Sans-serif; color:#fff; } .wrap { width: 750px; } .row { width: 200px; margin: 0 auto; } #container { //margin:0 auto; position: absolute; top: 30%; left:30%; width: 800px; margin-left: auto ; margin-right: auto ; } <body> <div id="container" class="wrap"> <table width='100%' border='0' align='center' cellspacing='0'> <form action="authenticate.php" class="gen-form" method="post"> <input class="text-input" id="username" name="username" tabindex="1" type="text" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Username...':this.value;" value="Username..." /> <input class="text-input" id="password" name="password" tabindex="1" type="password" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Password...':this.value;" value="Password..." /> <input type="submit" class="button" value="" tabindex="3"> </form> <div class="content_body"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> <div class="register_button_padding"> <input type="submit" class="register_button" value="" tabindex="3"> </div> </div> </body> </html>
-
this is my html and css can you tell me where am wrong and help me correct it the left content is okay but the main content the right one im having troubling keep the text within the box. THE CSS
-
this is my html and css can you tell me where am wrong and help me correct it the left content is okay but the main content the right one im having troubling keep the text within the box. THE CSS
-
I have shops with over 100's of items, just wanted to reduce the amount of scrolling by involving pages, each page displays a limit of 10. I use mccodes v.2 Can someone help me out please?
-
ok i figured out the formula...dont worry thanks anyways
-
Anyone will to help me?
-
Ok this formual thing really gets confusing, so i want to make it simple when making a crime instead creating some long formula, then playing around with it i want it like a percentage format, out of 100 you enter the percentage of success for that crime. instead of this ((WILL*0.8)/2.5)+(LEVEL/4) i want it in simple form like in figures (10%, 20%,30%) etc.. the edit would be needed in the docrime.php in this section but i dont know what to do can someone help? $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); $ir['brave']-=$r['crimeBRAVE']; mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); $db->query("UPDATE users SET crimes=crimes+1 WHERE userid={$ir['userid']}"); if(rand(1,100) <= $sucrate) { echo" <font style=color:white;>{$r['crimeSTEXT']}</font>"; echo' <font style=color:white;><b><u>Cash gained: </u></b></font><font style=color:limegreen;>$'.number_format($r['crimeSUCCESSMUNY']).'</font>'; echo" <br /> <center> <img src='images/crime/success.png' alt='SUCCESS'> <br /> <a href='docrime.php?c={$_GET['c']}'><input type=submit value=Redo></a> <a href='crime.php'><input type=submit value=Back></a> </center>"; $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c); $db->query("UPDATE users SET crimespassed=crimespassed+1 WHERE userid={$ir['userid']}"); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } }
-
that doesnt help i can make a popup box to but it needs to display the content of the php file docrimes.php
-
What i was thinking of doing is having a crime page a normal one, such as the basic mccodes v2 one but when you have chosen your crime you press do i want a popup box appearing showing results with a progress bar till your next level. Can someone help me create this, how would i start it off?
-
its nothing to do with session, basically due to my register form being on my login.php and all the php checks and stuff on a separate file it is not picking up what is being typed into the captcha input
-
Im having a problem with my popup ajax register, on my login.php i have the html code for the captha is implemented in, once submitted my ajax register checks all the information in a sperate file which is ajax_register.php how ever the captcha does not function properly i also tried adding in method post and get did not work it wont pick up what being typed into the input for the captcha. This is the html form in the login.php <form action="ajax_register.php" method="post" id="registerForm"> <br /> <table width="100%" cellspacing="1"> <tr> Username<br /> <input name="username" id="username" onkeyup="CheckUsername(this.value);" type="text"/><br /> Password<br /> <input id="pw1" name="password" onkeyup="CheckPasswords(this.value);PasswordMatch();" type="password" /><br /> Confirm Password<br /> <td><input name="cpassword" id="pw2" onkeyup="PasswordMatch();" type="password" /><br /> Email<br /> <input id="email" name="email" onkeyup="CheckEmail(this.value);" type="email" /><br /> Gender<br /> <select name="gender" id="gender" type="dropdown"> <option value="Male">Male</option> <option value="Female">Female</option> </select><br /><br /> <?php if($set['regcap_on']) { echo "<img src='captcha_verify.php'/><br /> <input name='code' type='text' />"; } ?> </td> </tr> </table><br /> <div align="center"> <input type="submit" name="submit" value="Done" class="regbutton"> </div> <br /> <div id="callback" style="text-align: center;margin: 0 auto;color: black;background: #FFD9C8; border: 1px solid #F0BAA2;padding: 10px;opacity: 0.7;color:##232D30;width:80%;display: none; "> </div> <br /> </form> this is my ajax_register.php <?php include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; require "global_func.php"; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $extract = explode('&',$_POST['data']); foreach($extract as $e) { $data = explode('=',$e); $form[$data[0]] = urldecode($data[1]); } $username = ( isset($form['username'])&&preg_match("/^[a-z0-9_]+([\\s]{1}[a-z0-9_]|[a-z0-9_])+$/i", $form['username'])&&((strlen($form['username'])<32)&&(strlen($form['username'])>=3)) )?$form['username']:''; if($username && $form['password'] && $form['cpassword'] && $form['email'] && $form['gender']) { if($set['regcap_on']) { if(md5($_POST['code']) != $_SESSION['key']) die("You've failed the captcha test, please try again!"); } if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $form['email'])) { die("Sorry, this email is invalid <br />".$form['email']); } $sm=100; if($form['promo'] == "Your Promo Code Here") { $sm+=100; } $q=$db->query("SELECT * FROM users WHERE username='{$username}' OR login_name='{$username}'"); $q2=$db->query("SELECT * FROM users WHERE email='{$form['email']}'"); if($db->num_rows($q)) { echo "Username already in use. Choose another."; } else if($db->num_rows($q2)) { echo "E-Mail already in use. Choose another."; } else if($form['password'] != $form['cpassword']) { echo "The passwords did not match, please try again!"; } else { $form['ref'] = abs((int) $form['ref']); $IP = $db->escape($_SERVER['REMOTE_ADDR']); $q=$db->query("SELECT * FROM users WHERE lastip='$IP' AND userid={$form['ref']}"); if($db->num_rows($q)) { die("No creating referral multies. Bad dog."); } if($form['ref']) { $q=$db->query("SELECT * FROM users WHERE userid={$form['ref']}"); $r=$db->fetch_row($q); } $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$form['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$form['gender']}', unix_timestamp(), '{$form['email']}', -1, '$IP', '$IP')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); if($form['ref']) { require "global_func.php"; $db->query("UPDATE users SET crystals=crystals+5 WHERE userid={$form['ref']}"); event_add($form['ref'],"For refering $username to the game, you have earned yourself 5 crystals!",$c); $db->query("INSERT INTO referals VALUES('', {$form['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')"); } echo "Congratulations! You have signed up, enjoy the game."; } } else { echo 'You must fill in all fields'; } ?>
-
Would anyone want to help?
-
Im really confused when i train at the gym for example i use 1 energy. At current my energy would be 12/12 after training it would be 17/12 which breaks the bar design making the bar so long..can not figure it out can someone direct/help me. After certain amount of minutes it would reduce by its self and come back to 12/12. This is in the header which defines the bars.. $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; this is the formula in my gym which gains the stats. if($_POST['stat'] && $_POST['amnt']) { $stat=$statnames[$_POST['stat']]; if(!$stat) { die("<font style=color:red;><b>This skill/stat can not be trained.</font></b><br />"); } if($_POST['amnt'] > $ir['energy']) { print("<font style=color:red;><b>You do not have enough energy to train that much.</font></b><br />"); } else { $gain=0; for($i=0; $i<$_POST['amnt']; $i++) { $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/150); $ir['will']-=rand(1,3); if($ir['will'] < 0) { $ir['will']=0; } } if($ir['jail']) { $gain/=2; } $db->query("UPDATE `userstats` SET `{$stat}` = `{$stat}` + $gain WHERE `userid` = $userid"); $db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - {$_POST['amnt']} WHERE `userid` = $userid"); $inc=$ir[$stat]+$gain; $inc2=$ir['energy']-$_POST['amnt']; if($stat=="strength") { echo " <font style=color:limegreen;>You place some weights on both sides of the barbell and start to pumping!<br /> You have gained {$gain} strength by doing {$_POST['amnt']} reps.<br /> You now have {$inc} strength and {$inc2} energy left.</font><br /> "; }
-
I didnt understand what you said can you show me an example basically i would want to see what item is equipped in the slots, for weapon it would be the weapon power + strength giving a total weapon damage... same with the rest armour power + guard