Prosilbym o porady, o to kod pliku 'dbc.php' w ktorym jest zdefiniowana funkcja logowania o nazwie 'page_protect.php', ten plik dbc.php jest zincludowany do tego pliku gdzie mam wlasnie problem z divem.
<?php $dbname = 'xxxxxx'; /*****************ADMIN SECTION PASSWORD***************************/ /****** SET A STRONG PASSWORD WITH ATLEAST 6-8 CHARS***************/ $admin_user = 'xxx'; $admin_pass = 'xxx'; /*************** reCAPTCHA KEYS****************/ $publickey = "xxxxxxxxxxxxxxxxxxxxxxx"; $privatekey = "xxxxxxxxxxxxxxxxxxxx"; /**************** EMAIL SETTINGS ************************** This script needs class.phpmailer.php and class.smtp.php files from PHPMailer library. Download here: <a href="http://phpmailer.sourceforge.net" target="_blank">http://phpmailer.sourceforge.net</a> Upload class.phpmailer.php and class.smtp.php to your phplogin script folder. 1. Create email account for auto-reply@domain.com in your hosting account. Specify here 2. Enter SMTP hostname 3. Enter SMTP password 4. Specify FROM email addres, 5. Specify FROM label and subject (optional). ***********************************************************/ /* DISABLED $smtp_host = "xxxxxxxxxxxx"; // SMTP server Example: mail.example.com $smtp_user = "xxxxxxxxxxxxxx"; // SMTP Username - Example: auto-reply@domain.com $smtp_passwd = "xxxxxxxxxxxx"; // SMTP password $smtp_from = "xxxxxxxxxxxxx"; // Example: auto-reply@example.com $smtp_from_name = "Member Registration"; // Label for FROM address $smtp_subject = "Login Details"; // Message Subject */ /**** PAGE PROTECT CODE ******************************** This code protects pages to only logged in users. If users have not logged in then it will redirect to login page. If you want to add a new page and want to login protect, COPY this from this to END marker. Remember this code must be placed on very top of any html or php page. ********************************************************/ function page_protect() { //check for cookies $_SESSION['user_id'] = $_COOKIE['user_id']; $_SESSION['user_name'] = $_COOKIE['user_name']; } { } /*******************END********************************/ } function filter($data) { return $data; } function EncodeURL($url) { return($new); } function DecodeURL($url) { return($new); } function ChopStr($str, $len) { return $str; return $str . "..."; } function isEmail($email){ } function isUserID($username) { return true; } else { return false; } } function isURL($url) { if (preg_match('/^(http|https|ftp):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i', $url)) { return true; } else { return false; } } function checkPwd($x,$y) { return false; } return true; } ?>
Taki kod mam w pliku którym mam problem z divem
Oczywiscie na samym poczatku dokumentu umieszczone:
<? include ('dbc.php'); page_protect(); ?>
Chciałbym jeszcze dodac ze ten div przesuwa sie przy losowym odswiezeniu tzn. naprzyklad za 5 odswiezeniem zmieni pozycje a za 2 nie itd.