Jump to content

Search the Community

Showing results for tags 'ect'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 9 results

  1. Hey again, i have a small but quick question. How to define days in numbers oO?... i saw this online: $six_day_loader['max_dead_torrent_time'] = 6 * 3600; //6-days... and was hoping to kind of using this the same way for one of my projects... now, if i wish to delete a forum post after (lets say 12 days)... how to define this in numbers like above here?... how many numbers are there at a day?, and how to find out?..can someone clarify this for me, i just dont get it yet... i think oO?... Hoping you can help somehow again x)...
  2. Hello, not sure if it's this board i should ask (html)...but tell me if im wrong. i have seemed on some few site's im comming on sometimes, that they have some sort of div-box that follows the screen all the time, evem if you scroll down on the page. is it possible to do this?.. i mean, how to do this in css/html.. is it possible?, or DO i need Jquery/Javascript or wtf i now need? Oo.. i just think it would be a smart thing to have on my own website ...
  3. hello again,just a fast question... if i have somfthing like a little bit over 500 Words in a DB... and i am outputtin them with a normal SELECT in the query, is there not somfthing i can do in the query so that it can only show like 100 words, and if more, then in the end of the word(s), there will be added this: (...) to look more nicer in the design, thanks in advance! ...
  4. yoyo w3s...im having a little trouble with my login page... here you can see the example: http://speed-scene.c...scene/login.php anyways, i allready knew about sessions and such, so i was thinking that it was time to expand my knowledge a little. so i was trying to make a login page that was using cookies to log me in, and while expanding, i was thinking that i could try it out on one of my projects on the following link i have allready given. but the trouble is that when im trying to login, then im just staying at the same page, and nofthing by then happends... here is all my login codes/pages im using: 1. bittorrent.php inside include folder from root (The functions im using to get the login thing to work...): function dbconn($autoclean = false){global $SS;if (!@mysql_connect($SS['mysql_host'], $SS['mysql_user'], $SS['mysql_pass'])){ switch (mysql_errno()) { case 1040: case 2002: if ($_SERVER['REQUEST_METHOD'] == "GET") die("<html><head><meta http-equiv='refresh' content=\"5 $_SERVER[REQUEST_URI]\"></head><body><table border='0' width='100%' height='100%'><tr><td><h3 align='center'>The server load is very high at the moment. Retrying, please wait...</h3></td></tr></table></body></html>"); else die("Too many users. Please press the Refresh button in your browser to retry."); default: die("[" . mysql_errno() . "] dbconn: mysql_connect: " . mysql_error()); }}mysql_select_db($SS['mysql_db']) or die('dbconn: mysql_select_db: ' . mysql_error());//mysql_query("SET NAMES utf8");mysql_set_charset('utf8');userlogin();if ($autoclean) register_shutdown_function("autoclean");} /*LOGIN FUNCTIONS*/function sqlesc($x) {return "'".mysql_real_escape_string($x)."'";}function mkglobal($vars) {if (!is_array($vars))$vars = explode(":", $vars);foreach ($vars as $v) {if (isset($_GET[$v])) $GLOBALS[$v] = unesc($_GET[$v]);elseif (isset($_POST[$v])) $GLOBALS[$v] = unesc($_POST[$v]);else return 0;}return 1;}function set_mycookie( $name, $value = "", $expires_in = 0, $sticky = 1 ){ global $SS; if ( $sticky == 1 ){ $expires = time() + 60*60*24*365;} else if ( $expires_in ) { $expires = time() + ( $expires_in * 86400 ); } else { $expires = FALSE; } $SS['cookie_domain'] = $SS['cookie_domain'] == "" ? "" : $SS['cookie_domain']; $SS['cookie_path'] = $SS['cookie_path'] == "" ? "/" : $SS['cookie_path']; if ( PHP_VERSION < 5.2 ) { if ( $SS['cookie_domain'] ) { @setcookie( $SS['cookie_prefix'].$name, $value, $expires, $SS['cookie_path'], $SS['cookie_domain'] . '; HttpOnly' ); } else { @setcookie( $SS['cookie_prefix'].$name, $value, $expires, $SS['cookie_path'] ); }}else{ @setcookie( $SS['cookie_prefix'].$name, $value, $expires, $SS['cookie_path'], $SS['cookie_domain'], NULL, TRUE );}}function logincookie($id, $passhash, $updatedb = 1, $expires = 0x7fffffff){set_mycookie( "uid", $id, $expires );set_mycookie( "pass", $passhash, $expires );if ($updatedb) @mysql_query("UPDATE users SET last_login = ".TIME_NOW." WHERE id = $id");}function logoutcookie() {set_mycookie('uid', '-1');set_mycookie('pass', '-1');}function loggedinorreturn() {global $CURUSER, $SS;if (!$CURUSER){ header("Location: {$SS['baseurl']}/login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"])); exit();}}function get_mycookie($name){global $SS; if (isset($_COOKIE[$SS['cookie_prefix'].$name]) AND !empty($_COOKIE[$SS['cookie_prefix'].$name])) { return urldecode($_COOKIE[$SS['cookie_prefix'].$name]); } else { return FALSE; }}function userlogin() {global $SS;unset($GLOBALS["CURUSER"]);$ip = getip();$nip = ip2long($ip);require_once "cache/bans_cache.php";if(count($bans) > 0){foreach($bans as $k) { if($nip >= $k['first'] && $nip <= $k['last']) { header("HTTP/1.0 403 Forbidden"); print "<html><body><h1>403 Forbidden</h1>Unauthorized IP address. Please, piss off... you had your chance.</body></html>\n"; exit(); }}unset($bans);}if (!$SS['site_online'] || !get_mycookie('uid') || !get_mycookie('pass'))return;$id = 0 + get_mycookie('uid');if (!$id || strlen( get_mycookie('pass') ) != 32)return;$res = mysql_query("SELECT * FROM users WHERE id = $id AND enabled='yes' AND status = 'confirmed'");// or die(mysql_error());$row = mysql_fetch_assoc($res);if (!$row)return;if (get_mycookie('pass') !== $row["passhash"])return;mysql_query("UPDATE users SET last_access='" . TIME_NOW . "', ip=".sqlesc($ip)." WHERE id=" . $row["id"]);// or die(mysql_error());$row['ip'] = $ip;$GLOBALS["CURUSER"] = $row;}/*LOGIN FUNCTIONS*/ 2. this is my password_functions.php file inside include folder from root: <?phpfunction mksecret($len=5){ $salt = ''; for ( $i = 0; $i < $len; $i++ ) { $num = rand(33, 126); if ( $num == '92' ) { $num = 93; } $salt .= chr( $num ); } return $salt;} function make_passhash_login_key($len=60){ $pass = mksecret( $len ); return md5($pass);} function make_passhash($salt, $md5_once_password){ return md5( md5( $salt ) . $md5_once_password );} function make_password(){ $pass = ""; $unique_id = uniqid( mt_rand(), TRUE ); $prefix = mksecret(); $unique_id .= md5( $prefix ); usleep( mt_rand(15000,1000000) ); mt_srand( (double)microtime()*1000000 ); $new_uniqueid = uniqid( mt_rand(), TRUE ); $final_rand = md5( $unique_id.$new_uniqueid ); mt_srand(); for ($i = 0; $i < 15; $i++) { $pass .= $final_rand{ mt_rand(0, 31) }; } return $pass; }?> 3. this is my login.php file from root: <?phprequire_once("include/bittorrent.php");echo stdhead("Login");?> <form method="post" action="takelogin.php"><table class="login_table" align="center" border="1"><tr><td>Username</td><td><input type="text" name="username" id="username" size="35" /></td></tr><tr><td>Password</td><td><input type="password" name="password" id="password" size="35" /></td></tr><tr><td align="center" colspan="2"><input type="submit" name="login_submit" value="Login Now!" /></td></tr></table></form> <?phpecho stdfooter();?> 4. and at last, this is my takelogin.php file from root: <?phprequire_once 'include/bittorrent.php';require_once "include/password_functions.php";echo stdhead("Login");if (!mkglobal('username:password'))die();dbconn();$lang = array_merge(load_language('takelogin'));$res = mysql_query("SELECT id, passhash, secret, enabled FROM users WHERE username = " . sqlesc($username) . " AND status = 'confirmed'");$row = mysql_fetch_assoc($res);if (!$row)stderr($lang['tlogin_failed'], 'Username or password incorrect');if ($row['passhash'] != make_passhash($row['secret'], md5($password)))stderr($lang['tlogin_failed'], 'Username or password incorrect');if ($row['enabled'] == 'no')stderr($lang['tlogin_failed'], $lang['tlogin_disabled']);logincookie($row['id'], $row['passhash']);header("Location: {$SS['baseurl']}/index.php");echo stdfooter();?> and now to the big question, what the heck is wrong since i cannot login?... ideas where to check... it seems for my eye that i cannot see where to edit, since its all looking pretty well for both me and 1 other guys online i am coding with sometimes ... but the login does not work, so it is obviously that the codes does not either...but in anyways... i would be very much happy if anyone in here could tell me where to have my eyes on... thanks alot! ... PS: if wish to see the whole project, then you can use the following .FTP user to grand acces to the server and read the files, just in case you need more information.. HOST: blackbitt.comUSER: ftp_reader@blackbitt.comPASS: Reader1PORT: 21 bittorrent.php file is the main design to the whole site, and all my functions. in this way i have maked a Global Based design... Hoping you guys once more can guid me on to the right road again, thanks alot in advance! ...
  5. hello w3s again... i have trouble again with a self project, and this time (like allways) i have no clue why it does this... 1. i have some files like so given in picture: ATTACHED now inside the bittorrent.php file, i have my whole site defined in functions like so: <?php/*=========================*/$mysql_host = "localhost";$mysql_user = "root";$mysql_pass = "daniel1";$mysql_db = "ss_2012";$db_details = mysql_connect($mysql_host, $mysql_user, $mysql_pass);mysql_select_db($mysql_db, $db_details)or die(mysql_error());/*=========================*/function stdhead($title = "",$css_file = ""){$stdhead_start .="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html'; charset=iso-8859-1' /><link rel='stylesheet' type='text/css' href='styles/".$css_file.".css'/><link rel='shortcut icon' href='fav_icon.ico' /><title>".$title."</title></head><body>"; $stdhead_start .="<table class='banner_table' align='center' cellpadding='0'><tr><td><a href='index.php'><img src='styles/images/banners/banner.png' width='1000' height='140' alt='SS_2012' /></a></td></tr></table>"; $stdhead_start .="<table class='status_table' align='center'><tr><td class='status_left'>LEFT</td><td class='status_right'>RIGHT</td></tr></table>"; $stdhead_start .="<table class='menu_table' border='0' align='center'><tr><td class='navigation'><a href='index.php'>HOME</a></td><td class='navigation'><a href='browse.php'>BROWSE</a></td><td class='navigation'><a href='upload.php'>UPLOAD</a></td><td class='navigation'><a href='request.php'>REQUESTS</a></td><td class='navigation'><a href='chat.php'>CHAT</a></td><td class='navigation'><a href='forums.php'>FORUM</a></td><td class='navigation'><a href='guides.php'>GUIDES</a></td><td class='navigation'><a href='bonus.php'>BONUS</a></td><td class='navigation'><a href='rules.php'>RULES</a></td><td class='navigation'><a href='faq.php'>FAQ</a></td><td class='navigation'><a href='links.php'>LINKS</a></td><td class='navigation'><a href='support.php'>SUPPORT</a></td></tr></table>"; $stdhead_start .="<table class='main_table' align='center'><tr><td>";return $stdhead_start;}//stdhead ends... function stdfooter(){$stdfoot_start ="</td></tr></table> <table class='foot_table' align='center'> <tr> <td>Speed-Scene © 2012 -> Revision 01</td> </tr> </table> </body> </html>"; return $stdfoot_start;}//stdfooter ends... /*====================FUNCTIONS PLACE!...====================================*/ function tr($x,$y,$noesc=0) {if ($noesc) $a = $y;else { $a = htmlspecialchars($y); $a = str_replace("\n", "<br />\n", $a);}print("<tr><td class=\"heading\" valign=\"top\" align=\"right\">$x</td><td valign=\"top\" align=left>$a</td></tr>\n");} function genrelist() {$ret = array();$res = mysql_query("SELECT id, name FROM categories ORDER BY name");while ($row = mysql_fetch_array($res)) $ret[] = $row;return $ret;} function StatusBar(){echo "<table class='status_table' align='center'><tr><td class='status_left'>LEFT</td><td class='status_right'>RIGHT</td></tr></table>";}?> and when i replace the status bar place with the StatusBar() Function inside the head function, then i get this result here: http://speed-scene.c...wrong/login.php and when i have the normal text building writed inside the place, then i get the normal design as i wish it to be like this: http://speed-scene.c..._good/login.php now, what i am in a need of, is that if someone can explain me why the design is going to be screwed up with all stuff, the fonts size,the status over the banner, even when i have said to it that it should be under it... then its placing itself up there -.-'... and im calling the designs like so as a example on my login page: <?phprequire_once("include/bittorrent.php");echo stdhead("Login","1");?> This is the Login Page!... <?phpecho stdfooter();?> so now i have my final question here... what the heck am i doing wrong?... someone?... ideas?... EDIT: and no, im not trying to make a torrent tracker... just called the file bittorrent.php for that name because i was trying to follow a tutorial .. EDIT #2: Did i post the right place at all?... mean, should i post in css section instead? ...
  6. hello w3schools again, i just have a question this time .today i was trying to adding a upload script to my personal website . by following this tutorial: http://www.w3schools.com/php/php_file_upload.asp so here is my question.if im doing the saving part ''with'' the restrictions on it. what is the syntax for uploading a .torrent/.php/.html/ect file... i mean, before a filetype, there is somfthing that needs to be typed, like now, (image) ect...what is the syntax for making the part of a PHP and TORRENT file. thanks in advance.Hoping answers soon.
  7. yoyo w3s...a question is needed to be answered... i have lately readed a little on to cakePHP... but i would like to know, if any in here think its better then normal PHP. and if so, then can anyone help me a little here?... because im trying to build up a design in it, so that an another coder from my mentor team online at ''World Wide Web'' ^^', can code the functionality to it... ideas?...and yes, i have downloaded latest version, just how to use it... i have tried to build up the simple blog at their main website, but it was a ###### without equal... that is why im asking here, when i now did not got my question in that tutorial answered... so... please answer ^^'...
  8. hello all from w3s again... i have seemed the PHP word ''Define''. now my questio is. if i have 2 files in my root, and 3 files in a folder called include, and one of those inside include folder is called main_design.php. and called by 2 functions like so inside all the other files inside root...: function stdhead($title = "",$css_file = ""){$stdhead_start = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html'; charset=iso-8859-1' /><link rel='stylesheet' type='text/css' href='styles/".$css_file.".css'/><link rel='shortcut icon' href='fav_icon.ico' /><title>".$title."</title></head><body><table class='banner_table' align='center' cellpadding='0'><tr><td><a href='index.php'><img src='styles/images/banners/banner.png' width='1000' height='140' alt='SS_2012' /></a></td></tr></table> <table class='menu_table' border='0' align='center'><tr><td class='navigation'><a href='index.php'>HOME</a></td><td class='navigation'><a href='browse.php'>TORRENTS</a></td><td class='navigation'><a href='index.php'>REQUESTS</a></td><td class='navigation'><a href='index.php'>BECOME UPLOADER</a></td><td class='navigation'><a href='index.php'>CHAT</a></td><td class='navigation'><a href='index.php'>FORUM</a></td><td class='navigation'><a href='index.php'>GUIDES</a></td><td class='navigation'><a href='index.php'>BONUS</a></td><td class='navigation'><a href='index.php'>RULES</a></td><td class='navigation'><a href='index.php'>FAQ</a></td><td class='navigation'><a href='index.php'>LINKS</a></td><td class='navigation'><a href='index.php'>SUPPORT</a></td></tr></table> <table class='main_table' align='center'><tr><td>";return $stdhead_start;}//stdhead ends... function stdfooter(){$stdfoot_start ="</td></tr></table> <table class='foot_table' align='center'> <tr> <td>Speed-Scene © 2012 -> Revision 01</td> </tr> </table> </body> </html>";return $stdfoot_start;}//stdfooter ends... and root files ect; <?phprequire_once("include/bittorrent.php");echo stdhead("Home","1");?>This is the Index Page!...<?phpecho stdfooter();?> now my question is, that if i have an another file inside include called config.php. and wish to make a define inside there... and after that, call it on one of the root files, so it would go inside the include folder, and then i just need to write the name of the file i need to have ect... how do i do this?... thanks in advance!
  9. Hello W3schools again, a problem has been showed up on my little shop project again, and some people in here might knows it still... anyways... the people that tried to help me, if you are one of them. please read on... else, well... just read ... anyways... i went to my school teacher (one of them) and asked for help, and we did solve it with some big issues he told me and pointed out for me... and that was a big help for the understanding...anyways. i came home... and now the weird part is comming... when im trying to add somfthing to my shop (the cart/session)... then its like it just wont listen, because the fun part is that it (DOES) redirects do shop.php as i told it to do in the function that i call to add the redirect... that... orr its just updating.. but seems like it redirects... anyways... here are the files of my related to the shop: (ATTACHED) and i must say, i dont really knows how to explain this... since it would be impossible to redirect without the function, and that i cannot see either on the URL... :/...so please tell me if you need more information on anything... dont knows what to tell... (NO PAGE ERRORS...) so i cannot really answer anymore questions on this problem unless you are asking me ... Hoping answers soon... Regards: rootKID EDIT: Note that the details page its just a beginning... but thinked that it would be ok to add it just in case you was wonder... lol ...
×
×
  • Create New...