Jump to content

bulgaria_mitko

Members
  • Posts

    39
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bulgaria_mitko's Achievements

Member

Member (2/5)

0

Reputation

  1. and the page will still loads in the background right? can u write me a simple code for an example? i will be very thankful, I'm beginner in php!
  2. hey, enjaminbeazy, im not very good in js, can u give me an example? what if the big page is http://movies.yahoo.com/ and the page that i want to display white page is rendering this text: loading message how do u do that? ???
  3. no its not 5-6 mins, i lie of course lol, but it takes quite a long time. and thank you for the suggestion! any others?
  4. the idea is a script that loads when a large page is trying to open that need for example 5-6 mins to load and in the mean time to open a very small page that is saying loading the page please wait and when the large page is loaded to go directly to that page. Do u get my idea? Thank you very much!
  5. go to http://195.234.237.173/ and click some links on the very top right of the site and see what happens, for example the url changed to http://195.234.237.173/page.php?p=about but its not displaying the actual site about.htm can u help me and tell me why is this happening? i will post u the php code for page.php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php if((!empty($p))&&($p!="")){ $page=$p.".htm"; $add_txt = file("pages/$page"); for ($cm=0;$cm<count($add_txt);$cm++){ $add1_txt.=$add_txt[$cm]; } $rb=strpos($add1_txt,"<title>"); $re=strpos($add1_txt,"</title>"); $rend=$re-$rb; $title_page=substr($add1_txt,$rb,$rend); $title_page=str_replace("<title>","",$title_page); $page_txt=str_replace("<title>$title_page</title>","",$add1_txt); } ?> <?php if ($Submit){ $mbody="Продукт: $product\nДопълнителна информация: $information\nИме: $name\nE-mail: $email\nТел. факс: $phone\n"; $mbody.="Заявка\nIP address: ". getenv('REMOTE_ADDR'); $msub="Запитване от сайта на Тесс Партнерс"; $maddheader="From: web@tesspartners\r\nReply-to:office@tesspartners.com"; mail("office@tesspartners.com", $msub,$mbody,$maddheader); $ref=getenv("HTTP_REFERER"); $ref1="tesspartners.com"; //if (strstr($ref, $ref1)) { $product = addslashes ($product); $information = addslashes ($information); $name = addslashes ($name); $email = addslashes ($email); $phone = addslashes ($phone); $data = date('r'); //проверка дали полето за телефон е само от цифри if(eregi("^\+*[0-9]+$", $phone) or empty($phone)) { $db = mysql_pconnect('localhost', 'tessp_slavi', '213240227122'); $ska = mysql_select_db('tessp_webzap'); $query = "insert into web_zap values ('NULL', '".$product."', '".$information."', '".$name."', '".$email."', '".$phone."', '".$REMOTE_ADDR."', '".$data."')"; $result = mysql_query($query); $query1 = "insert into web_zap2 values ('NULL', '".$product."', '".$information."', '".$name."', '".$email."', '".$phone."', '".$REMOTE_ADDR."', '".$data."')"; $result = mysql_query($query1); } } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>TESS Partners - <?php echo $title_page; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <meta name="keywords" content="software, solutions, internet" /> <meta name="description" content="Software solutions & maintanence; Софтуерни решения и поддръжка" /> <meta name="ROBOTS" content="INDEX,FOLLOW" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href="css/example1.css" /> <script type="text/javascript" src="js/ie5.js"></script> <script type="text/javascript" src="js/DropDownMenuX.js"></script> <script type="text/javascript" src="js/validateform.js"></script> </head> <body> <table width="760" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"> <table width="760" border="0" cellspacing="0" cellpadding="0"> <tr> <td rowspan="2" width="269"><img src="images/logo.jpg" width="269" height="79" alt="" /></td> <td style="background-image:url('images/bg_topmenu.gif')" align="right"> <!--Top Menu 1 --> <?php include ("includes/topmenu2.inc"); ?> <!--End Top Menu 1 --> </td> </tr> <tr> <td width="491"><img src="images/splash1.jpg" width="491" height="59" alt="" /></td> </tr> </table> </td> </tr> <tr> <td colspan="2"><img src="images/splash2.jpg" width="760" height="89" alt="" /></td> </tr> <tr> <td colspan="2" style="background-image:url('images/bg_topmenu2.gif')" height="28"> <!-- start table top menu 2 --> <table width="760" cellspacing="0" cellpadding="0"> <tr> <td> <!--Top Menu 2 --> <?php include ("includes/topmenu1.inc"); ?> <!--End Top Menu 2 --> </td> <td width="1" bgcolor="#6F6F6F"><img src="images/spacer.gif" width="1" height="26" alt="" /></td> </tr> </table> <!-- end table top menu 2 --> </td> </tr> <!-- kraj na glavata --> <tr> <td colspan="2"> </td> </tr> <tr> <td width="494" valign="top" align="center"> <table width="486" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="text"> <!-- Content --> <?php echo $page_txt; ?> <!-- End Content --> </td> </tr> <!-- <tr> <td><img src="images/spacer.gif" width="1" height="8" alt="" /></td> </tr> --> </table> </td> <td valign="top" width="266" style="background-image:url('images/bg_news.gif')"> <!-- start table form --> <table width="266" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="12"><img src="images/tb_news_left.gif" width="12" height="26" alt="" /></td> <td style="background-image:url('images/tb_news_bg.gif')" class="titleTb">Задайте вашите въпроси</td> <td width="12"><img src="images/tb_news_right.gif" width="12" height="26" alt="" /></td> </tr> <tr> <td> </td> <td> <!-- start form --> <?php include ("includes/form.inc"); ?> <!-- end form --> </td> <td> </td> </tr> </table> <!-- end table form --> </td> </tr> <tr> <td style="background-image:url('images/bg_bottom.gif')" class="textCR"> <!-- Bottom --> <?php include ("includes/copyright.inc"); ?> <!-- End Bottom --> </td> <td width="266" style="background-image:url('images/bg_news.gif')"> </td> </tr> <tr> <td colspan="2" bgcolor="#6F6F6F"><img src="images/spacer.gif" width="1" height="1" alt="" /></td> </tr> </table> <script type="text/javascript"> var ddmx = new DropDownMenuX('menu1'); ddmx.delay.show = 0; ddmx.delay.hide = 400; ddmx.position.levelX.left = 2; ddmx.init(); </script> </body> </html> and pls don't hack the site, i have a backup thank you!
  6. thank you, redbullmarky it is working now but i needed to remove this line [b]virtual('/nimatest/Connections/nimatest.php');[/b] and add the code inside nimatest.php in the page and add [b]exit;[/b] as you told me and now everything is working fine! thank you! i dont know what was cousing the problem but now everything seems to work fine! :) thank you very much to everyone again!
  7. thanks everyone for the help! i think i know where is my error it is in the line of code i output: [code] virtual('/nimatest/Connections/nimatest.php'); [/code] and after that few lines later i do this: [code]   $insertGoTo = "/nimatest/admin/usertypes/index.php";   if (isset($_SERVER['QUERY_STRING'])) {     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";     $insertGoTo .= $_SERVER['QUERY_STRING'];   }   header(sprintf("Location: %s", $insertGoTo)); [/code] and it is creating the warning because first i virtual nimatest.php and then i make header (redirection), but how can i move nimatest.php after header and if i do that will that help? the problem is that nimatest.php is my connection to the database and on line 82 and 83 it is require a database connection: [code]   mysql_select_db($database_nimatest, $nimatest);   $Result1 = mysql_query($insertSQL, $nimatest) or die(mysql_error()); [/code] and after that follow this code: [code]   $insertGoTo = "/nimatest/admin/usertypes/index.php";   if (isset($_SERVER['QUERY_STRING'])) {     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";     $insertGoTo .= $_SERVER['QUERY_STRING'];   }   header(sprintf("Location: %s", $insertGoTo)); [/code] i tried all everyone wrote me but everything is seems fine and still gives me that error
  8. can u help me I'm getting a error in the begging of the page it is loading correctly except for this warning at the very begging this is my php code: [code]<?php if (!isset($_SESSION)) {   session_start(); } $MM_authorizedUsers = "1,2"; $MM_donotCheckaccess = "false"; // *** Restrict Access To Page: Grant or deny access to this page function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {   // For security, start by assuming the visitor is NOT authorized.   $isValid = False;   // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.   // Therefore, we know that a user is NOT logged in if that Session variable is blank.   if (!empty($UserName)) {     // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.     // Parse the strings into arrays.     $arrUsers = Explode(",", $strUsers);     $arrGroups = Explode(",", $strGroups);     if (in_array($UserName, $arrUsers)) {       $isValid = true;     }     // Or, you may restrict access to only certain users based on their username.     if (in_array($UserGroup, $arrGroups)) {       $isValid = true;     }     if (($strUsers == "") && false) {       $isValid = true;     }   }   return $isValid; } $MM_restrictGoTo = "/nimatest/admin/login.php"; if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {    $MM_qsChar = "?";   $MM_referrer = $_SERVER['PHP_SELF'];   if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";   if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)   $MM_referrer .= "?" . $QUERY_STRING;   $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);   header("Location: ". $MM_restrictGoTo);   exit; } ?> <?php virtual('/nimatest/Connections/nimatest.php'); function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {   $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;   switch ($theType) {     case "text":       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";       break;        case "long":     case "int":       $theValue = ($theValue != "") ? intval($theValue) : "NULL";       break;     case "double":       $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";       break;     case "date":       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";       break;     case "defined":       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;       break;   }   return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) {   $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {   $insertSQL = sprintf("INSERT INTO usertype (UserType) VALUES (%s)",                       GetSQLValueString($_POST['UserType'], "text"));     mysql_select_db($database_nimatest, $nimatest);   $Result1 = mysql_query($insertSQL, $nimatest) or die(mysql_error());   $insertGoTo = "/nimatest/admin/usertypes/index.php";   if (isset($_SERVER['QUERY_STRING'])) {     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";     $insertGoTo .= $_SERVER['QUERY_STRING'];   }   header(sprintf("Location: %s", $insertGoTo)); } ?> <!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"><!-- InstanceBegin template="/Templates/Admin Layout.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Нима - Администрация - Добави нов тип потребител</title> <!-- InstanceEndEditable --> <?php virtual('/nimatest/includes/header.php'); ?> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> <link href="/nimatest/assets/css/admin.css" rel="stylesheet" type="text/css" /> </head> <body onload="MM_preloadImages('/nimatest/assets/images/navigation/aboutus-over.gif','/nimatest/assets/images/navigation/ourproducts-over.gif','/nimatest/assets/images/navigation/abouttea-over.gif','/nimatest/assets/images/navigation/brewingtea-over.gif')"> <?php virtual('/nimatest/includes/navigation.php'); ?>   <tr>     <td id="tdContent"><h1>Администрация: <!-- InstanceBeginEditable name="Section name" -->Добави нов типотребител <!-- InstanceEndEditable --> </h1>       <!-- InstanceBeginEditable name="Body Contant" -->       <p>Попълни формата, за да добавиш нов потребител! </p>       <form method="post" name="form1" action="<?php echo $editFormAction; ?>">         <table align="center">           <tr valign="baseline">             <td nowrap align="right">Тип потребител:</td>             <td><input type="text" name="UserType" value="" size="32"></td>           </tr>           <tr valign="baseline">             <td nowrap align="right">&nbsp;</td>             <td><input type="submit" value="Добави нов тип потребител"></td>           </tr>         </table>         <input type="hidden" name="MM_insert" value="form1">       </form>       <!-- InstanceEndEditable --></td>     <td id="tdSidebar"><a href="/nimatest/admin/users/index.php"><img src="/nimatest/assets/images/navigation/bullet.gif" alt="" width="12" height="7" />Потребители </a><a href="/nimatest/admin/usertypes/index.php"><img src="/nimatest/assets/images/navigation/bullet.gif" alt="" width="12" height="7" />Типове потребител </a><a href="../logout.php"><img src="/nimatest/assets/images/navigation/bullet.gif" alt="" width="12" height="7" />Изход</a> </td>   </tr> <?php virtual('/nimatest/includes/footer.php'); ?> </body><!-- InstanceEnd --> </html>[/code]
  9. ok, i have other question is there possible to record a page like with value or session and then call this page from the value or from the session, i will give u an example if someone want to go to page call buy.php, but he need to be login to go to that page and when he successfully logged in to call this page he came from before in this case buy.php in addition to that i want to say that the first page buy.php can be other page for example go.php post.php and so on thats why i need something like value or session to record the page he camed from and to call it when he was successfully logged in! Thank you very much in advance! 
  10. ident.php [code]<?php if (isset($_POST['потребител'],$_POST['парола'])) { $user = $_POST['потребител']; $pass = $_POST['парола']; } if (isset($user,$pass)) { include "sql.php"; mysql_connect("$sql_host", "$sql_user_name", "$sql_user_pass"); mysql_select_db("$sql_database"); $login = mysql_query("SELECT * FROM users WHERE `user`='$user' AND `pass`='$pass' LIMIT 1"); while ($row = mysql_fetch_object($login)) {   $user = $row -> user;   $pass = $row -> pass;   $name = $row -> name;   $town = $row -> town;   $adress = $row -> adress;   $tel = $row -> tel;   $mail = $row -> mail;   $tel_type = $row -> tel_type; } if (isset($user,$pass,$name,$adress,$tel,$mail)) {   $_SESSION['user'] = $user;   $_SESSION['pass'] = $pass;   $_SESSION['name'] = $name;   $_SESSION['town'] = $town;   $_SESSION['adress'] = $adress;   $_SESSION['tel'] = $tel;   $_SESSION['tel_type'] = $tel_type;   $_SESSION['mail'] = $mail; } } ?> <div align="center"> <?php   if (!isset($_SESSION['user'],$_SESSION['pass'],$_SESSION['name'],$_SESSION['town'],$_SESSION['adress'],$_SESSION['tel'],$_SESSION['mail'])) {   echo '<table width="548" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">     <tr>       <td height="30"><div align="center">         <p><em>Грешно потребителско име или парола.</em></p>         </div></td>     </tr>     <tr>       <td><div align="center"><a href="index.php?page=users/login">Назад</a></div></td>     </tr>   </table>   ';   } else {   echo '<script language=JavaScript>window.location.href="index.php?page=users/wheel"</script>';   exit();   }   ?> </div> [/code]
  11. someone, pls!!!  :-[ :-[ :-[ :-[ :-[ :-[ :-[ :-[ :'( :'( :'( :'( :-\ :-\ :-\ :-\
  12. it dosent work with this code can someone pls help me!!!! i will post the codes for every page i have so someone can help me i hope products_v2.php: [code]<?php if (!isset($_SESSION['user'],$_SESSION['pass'],$_SESSION['name'],$_SESSION['town'],$_SESSION['adress'],$_SESSION['tel'],$_SESSION['mail'])) {   echo '<script language=JavaScript>window.location.href="index.php?page=users/login_register"</script>';   exit(); } $menu = $_GET["product"]; $type1 = $_GET["type1"]; $type2 = $_GET["type2"]; $type3 = $_GET["type3"]; $name = $_GET["name"]; if (!isset($_GET["session"])) { $session = rand(1,999999); } else { $session = $_GET["session"]; } $result_product = mysql_query(" SELECT * FROM `products` WHERE `menu`='$menu' AND `type1`='$type1' AND `type2`='$type2' AND `type3`='$type3' AND `name` LIKE '$name' LIMIT 1 "); $br_pr = 0; while ($row = mysql_fetch_object($result_product)) { $br_pr++; $menu = $row-> menu; $img = $row-> img; $type[1] = $row-> type1; $type[2] = $row-> type2; $type[3] = $row-> type3; $name = $row-> name; $price[1] = $row-> price1; $price[2] = $row-> price2; $price[3] = $row-> price3; $price[4] = $row-> price4; $price[5] = $row-> price5; $price[6] = $row-> price6; $price[7] = $row-> price7; $price[8] = $row-> price8; $price[9] = $row-> price9; $price[10] = $row-> price10; $price_info[1] = $row-> price1_info; $price_info[2] = $row-> price2_info; $price_info[3] = $row-> price3_info; $price_info[4] = $row-> price4_info; $price_info[5] = $row-> price5_info; $price_info[6] = $row-> price6_info; $price_info[7] = $row-> price7_info; $price_info[8] = $row-> price8_info; $price_info[9] = $row-> price9_info; $price_info[10] = $row-> price10_info; $info[1] = $row-> info1; $info[2] = $row-> info2; $info[3] = $row-> info3; $info[4] = $row-> info4; $info[5] = $row-> info5; $enter[1] = $row-> enter1; $enter[2] = $row-> enter2; $enter[3] = $row-> enter3; $enter[4] = $row-> enter4; $enter[5] = $row-> enter5; $enter[6] = $row-> enter6; $enter[7] = $row-> enter7; $enter[8] = $row-> enter8; $enter[9] = $row-> enter9; $enter[10] = $row-> enter10; $enter[11] = $row-> enter11; $enter[12] = $row-> enter12; $enter[13] = $row-> enter13; $enter[14] = $row-> enter14; $enter[15] = $row-> enter15; $enter[16] = $row-> enter16; $enter[17] = $row-> enter17; $enter[18] = $row-> enter18; $enter[19] = $row-> enter19; $enter[20] = $row-> enter20; $enter[21] = $row-> enter21; $enter[22] = $row-> enter22; $enter[23] = $row-> enter23; $enter[24] = $row-> enter24; $enter[25] = $row-> enter25; } if ($br_pr == 0) {   echo '<script language=JavaScript>window.location.href="index.php?page=error_login&error=Не e открит подобен артикул.&back=home"</script>';   exit(); } $result_product_menu = mysql_query("SELECT * FROM `menu` WHERE `menu_name` = '$menu' LIMIT 1"); while ($row = mysql_fetch_object($result_product_menu)) { $inf = $row-> menu_information; $pro = $row-> menu_promotion; $procent = $row-> menu_procent; } if ( $img == "" ) { $img = "noproview.jpg"; } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> <title>Печатница &quot;НИМА&quot;</title> <link href="css.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style12 {color: #FFFFFF} --> </style> </head> <body> <div align="center">   <table width="548" border="0" align="center" cellpadding="0" cellspacing="0">     <tr>       <td height="30"><div align="center"><strong>Настройки и регистриране на поръчката : </strong></div></td>     </tr>     <tr>       <td height="20" bgcolor="#9DCEFF"><div align="center" class="style12"><strong>Вид : <?php echo "$menu"; ?>  &nbsp;|&nbsp; Tип : <?php echo "$name"; ?></strong></div></td>     </tr>   </table>   <table width="548" border="0" cellspacing="0" cellpadding="0">     <tr>       <td><div align="center">         <table width="545" border="0" align="center" cellpadding="0" cellspacing="0">           <tr>             <td rowspan="2"><div align="center"> <?php for ( $i = 1 ; $i <= 5 ; $i++ ) { if ($info["$i"] != "") {   echo '               <table width="240" border="1" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" class="BlockTextSmall">                 <tr>                   <td bordercolor="#CCCCCC"> '.$info["$i"].' </td>                 </tr>               </table>   ';   }   } for ( $i = 1 ; $i <= 10 ; $i++ ) {             if ($price["$i"] != "") { echo '             <table width="240" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" class="BlockTextSmall">               <tr>                 <td bgcolor="#E0E0E0"><div align="center">Цена '.$price["$i"].'лв. ('.$price_info["$i"].') </div></td>               </tr>             </table>'; } } ?> </div></td>             <td width="300"><div align="center" class="BlockTextSmall">Образец : </div></td>           </tr>           <tr>             <td><div align="center"><a href="products/<?php echo "$img"; ?>" title="Изглед" target="_blank"><img src="view2.php?url=products/<?php echo "$img"; ?>" border="0" /></a></div></td>           </tr>         </table>       </div></td>     </tr>   </table>   <form action="index.php?page=products_v3&product=<?php echo "$menu"; ?>&type1=<?php echo "$type1"; ?>&type2=<?php echo "$type2"; ?>&type3=<?php echo "$type3"; ?>&name=<?php echo "$name"; ?>&session=<?php echo "$session"; ?>" method="post" enctype="multipart/form-data" name="form1">     <table width="545" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#B1D8FF">     <tr>       <td>&nbsp;         <span class="BlockTextSmall">Тук можете сами да съставите съдържанието на Вашите <?php echo "$menu"; ?> (ако артикула позволява). За целта въведете необходимите данни в долната форма.</span></td>     </tr>     <tr>       <td>   <?php   $views = 1;   for ( $i = 1 ; $i <= 10 ; $i++ ) {     if ( $enter["$i"] != "" ) { if ( $views == 1 ) {     echo '     <table width="535" border="0" align="center" cellpadding="0" cellspacing="0">             <tr bgcolor="#9DCEFF">             <td width="50%" height="20"><div align="center" class="style12"><strong>Текст</strong></div></td>             <td height="20"><div align="center" class="style12"><strong>Шрифт</strong></div></td>             </tr>             </table>'; $views = 2; }     echo ' <table width="535" border="0" align="center" cellpadding="0" cellspacing="0">           <tr>             <td width="50%"><div align="center">               <input name="enter'.$i.'" type="text" class="BlockTextSmall" id="enter'.$i.'" value="'.$enter["$i"].'" size="40">             </div></td>             <td width="50%"><div align="center">               <select name="font'.$i.'" class="BlockTextSmall" id="font'.$i.'">                 <option selected>Timok</option>                 <option>Timok Italic</option>                 <option>Timok Bold</option>                 <option>Timok Bold Italic</option>                 <option>Hebar</option>                 <option>Hebar Italic</option>                 <option>Hebar Bold</option>                 <option>Hebar Bold Italic</option>                 <option>HebarCond</option>                 <option>HebarCond Italic</option>                 <option>HebarCond Bold</option>                 <option>HebarCond Bold Italic</option>                 <option>Sentry</option>                 <option>Sentry Italic</option>                 <option>Sentry Bold</option>                 <option>Sentry Bold Italic</option>                 <option>SentryCond</option>                 <option>SentryCond Italic</option>                 <option>SentryCond Bold</option>                 <option>SentryCond Bold Italic</option>                 <option>Balkan</option>                 <option>Balkan Italic</option>                 <option>Balkan Bold</option>                 <option>Balkan Bold Italic</option>                 <option>Karina</option>                 <option>Karina Italic</option>                 <option>Karina Bold</option>                 <option>Karina Bold Italic</option>                 <option>Breeze</option>                 <option>Breeze Bold</option>                 <option>Fiesta</option>                 <option>Helen</option>                 <option>Helen Italic</option>                 <option>Helen Bold</option>                 <option>Helen Bold Italic</option>               </select>           </div></td>           </tr>         </table> '; }   }   ?>       <?php   for ( $i = 11 ; $i <= 20 ; $i++ ) {     if ( $enter["$i"] != "" ) {     echo '         <table width="500" border="0" align="center" cellpadding="0" cellspacing="0">           <tr>             <td width="40%"><div align="right">'.$enter["$i"].' : </div></td>             <td>               <div align="left">                 <input name="enter'.$i.'" type="text" class="BlockTextSmall" id="enter'.$i.'" size="40">               </div></td></tr>           </table> ';     }   }       ?>       <?php   $views = 1;   for ( $i = 21 ; $i <= 24 ; $i++ ) {     if ( $enter["$i"] != "" ) { if ( $views == 1 ) { echo '   <table width="535" border="0" align="center" cellpadding="0" cellspacing="0">           <tr bgcolor="#9DCEFF">             <td width="30%" height="20"><div align="center" class="style12"><strong>Текст</strong></div></td>             <td width="30%" height="20"><div align="center" class="style12"><strong>Шрифт</strong></div></td>             <td width="20%" bgcolor="#9DCEFF" class="style12"><div align="center"><strong>Размер</strong></div></td>             <td width="20%" class="style12"><div align="center"><strong>Позиция</strong></div></td>           </tr>         </table> '; $views = 2; } echo ' <table width="535" border="0" align="center" cellpadding="0" cellspacing="0">           <tr>             <td width="30%">               <div align="center">                 <input name="enter'.$i.'" type="text" class="BlockTextSmall" id="enter'.$i.'" value="'.$enter["$i"].'" size="25">               </div></td>             <td width="30%"><div align="center">               <select name="font'.$i.'" class="BlockTextSmall" id="font'.$i.'">                   <option>Timok</option>                   <option>Timok Italic</option>                   <option>Timok Bold</option>                   <option>Timok Bold Italic</option>                   <option selected>Hebar</option>                   <option>Hebar Italic</option>                   <option>Hebar Bold</option>                   <option>Hebar Bold Italic</option>                   <option>HebarCond</option>                   <option>HebarCond Italic</option>                   <option>HebarCond Bold</option>                   <option>HebarCond Bold Italic</option>                   <option>Sentry</option>                   <option>Sentry Italic</option>                   <option>Sentry Bold</option>                   <option>Sentry Bold Italic</option>                   <option>SentryCond</option>                   <option>SentryCond Italic</option>                   <option>SentryCond Bold</option>                   <option>SentryCond Bold Italic</option>                   <option>Balkan</option>                   <option>Balkan Italic</option>                   <option>Balkan Bold</option>                   <option>Balkan Bold Italic</option>                   <option>Karina</option>                   <option>Karina Italic</option>                   <option>Karina Bold</option>                   <option>Karina Bold Italic</option>                   <option>Breeze</option>                   <option>Breeze Bold</option>                   <option>Fiesta</option>                   <option>Helen</option>                   <option>Helen Italic</option>                   <option>Helen Bold</option>                   <option>Helen Bold Italic</option>               </select>             </div></td>             <td width="20%"><div align="center">               <select name="size'.$i.'" class="BlockTextSmall" id="size'.$i.'">                 <option selected>9</option>                 <option>10</option>                 <option>11</option>                 <option>12</option>                 <option>13</option>                 <option>14</option>                 <option>15</option>                 <option>16</option>                 <option>17</option>                 <option>18</option>                 <option>19</option>                 <option>20</option>               </select>             </div></td>             <td width="20%"><div align="center">               <select name="hor'.$i.'" class="BlockTextSmall" id="hor'.$i.'">                 <option selected>ляво</option>                 <option>център</option>                 <option>дясно</option>               </select>               <select name="ver'.$i.'" class="BlockTextSmall" id="ver'.$i.'">                 <option selected>горе</option>                 <option>средно</option>                 <option>долу</option>                 </select>             </div></td>           </tr>         </table> '; }   }   ?>       <?php     if ( $enter[25] == "да" ) {   echo '   <table width="535" border="0" align="center" cellpadding="0" cellspacing="0">           <tr>             <td height="20" bgcolor="#9DCEFF" class="style12"><div align="center"><strong>Изпращане на файл (снимка)</strong></div></td>           </tr>           </table> <table width="535" border="0" align="center" cellpadding="0" cellspacing="0">           <tr>             <td width="40%" height="30" class="BlockTextSmall">             <div align="center">Качване на файл (jpg до 300 кб) : </div></td>             <td><div align="center">               <input name="enter25" type="file" class="BlockTextSmall" id="enter25" size="35">             </div></td>           </tr>         </table> '; } unset($i); ?>                 </td>     </tr>   </table>     <table width="535" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">       <tr>         <td><div align="center">Плащане по :             <select name="pay_way" class="BlockTextSmall" id="pay_way">             <option>Банков път</option>             <option selected>Наложен платеж</option>             </select>         </div></td>       </tr>     </table>     <table width="535" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">     <tr>       <td height="60"><div align="center">           <select name="the_price" class="BlockTextSmall" id="the_price"> <?php for ( $i = 1 ; $i <= 10 ; $i++ ) {             if ($price["$i"] != "") {             if ( $i == 1 ) { echo '<option value="'.$price["$i"].'" selected>'.$price["$i"].' лв: '.$price_info["$i"].'</option>'; } else { echo '<option value="'.$price["$i"].'">'.$price["$i"].' лв: '.$price_info["$i"].'</option>'; } } } ?>         </select> <?php if (isset($procent)) { if ( $procent != "" ) { echo '         <table width="200" border="0" align="center" cellpadding="0" cellspacing="0">           <tr>             <td><div align="center"><span class="style13">ОТСТЪПКА : '.$procent.'%</span></div></td>           </tr>         </table>'; } } ?>       </div></td>       <td width="30%" bgcolor="#FFCC00"><div align="center">         <input name="Submit" type="submit" class="BlockTextNormal" value="ПОРЪЧАЙ">       </div></td>     </tr>   </table>   <table width="535" border="0" align="center" cellpadding="0" cellspacing="0">     <tr>       <td height="30"><div align="center"> <a href="http://www.econt.com/Econt_Net/Main.aspx" target="_blank"><strong>Доставка от врата до врата в зависимост от теглото! EcontExpress</strong></a></div></td>     </tr>     <tr>       <td height="30"><div align="center" class="BlockTextSmall"><em>Всички цени са без ДДС. </em></div></td>     </tr>   </table>   </form> </div> </body> </html> [/code] login_registration.php: [code]<?php ob_start(); // *** Validate request to login to this site. if (!isset($_SESSION)) {   session_start(); } $loginFormAction = $_SERVER['PHP_SELF']; if (isset($_GET['accesscheck'])) {   $_SESSION['PrevUrl'] = $_GET['accesscheck']; } ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> <title>Печатница &quot;НИМА&quot;</title> <link href="../css.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style1 {color: #FF0000} --> </style> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_findObj(n, d) { //v4.01   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);   if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0   var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;   for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);     if (val) { nm=val.name; if ((val=val.value)!="") {       if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');         if (p<1 || p==(val.length-1)) errors+='- полето '+nm+' трябва да съдържа валиден mail адрес.\n';       } else if (test!='R') { num = parseFloat(val);         if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';         if (test.indexOf('inRange') != -1) { p=test.indexOf(':');           min=test.substring(8,p); max=test.substring(p+1);           if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';     } } } else if (test.charAt(0) == 'R') errors += '- изисква се полето '+nm+'.\n'; }   } if (errors) alert('Иткрити са следните грешки:\n'+errors);   document.MM_returnValue = (errors == ''); } //--> </script> </head> <body> <div align="center">   <table width="548" border="0" align="center" cellpadding="0" cellspacing="0">         <tr>         <td><div align="center"><img src="images/login.jpg" width="550" height="50"></div></td>       </tr>     <tr>       <td height="30"><div align="center"><em>Моля въведете изискваната информация :       </em></div>        </td>     </tr>     <tr>       <td>        <form name="form1" method="post" action="index.php?page=users/ident">         <table width="540" border="0" align="center" cellpadding="0" cellspacing="2">           <tr>             <td width="220"><div align="right">Потребител : </div></td>             <td><input name="потребител" type="text" class="BlockTextNormal" id="потребител" size="25"></td>             </tr>           <tr>             <td width="220"><div align="right">Парола : </div></td>             <td><input name="парола" type="password" class="BlockTextNormal" id="парола" size="25"></td>           </tr>         </table>         <table width="100" border="0" align="center" cellpadding="0" cellspacing="0">           <tr>             <td><div align="center">                 <input name="Submit" type="submit" class="Thabutton" value="Вход">             </div></td>           </tr>         </table>       </form></td>     </tr>     <tr>       <td class="BlockTextSmall"><div align="right">Възникнал е  проблем ? </div></td>     </tr>     <tr>       <td class="BlockTextSmall"><div align="right"><a href="index.php?page=users/lost_pass">Забравена парола</a> </div></td>     </tr>     <tr>       <td class="BlockTextSmall"><div align="right"><a href="index.php?page=users/help">Помощ</a></div></td>     </tr>   </table> </div>   <form action="index.php?page=users/signup_proceed" method="post" enctype="multipart/form-data" name="form1">     <table width="545" border="0" align="center" cellpadding="0" cellspacing="0">       <tr>         <td><div align="center"><img src="images/register2.jpg" width="550" height="50"></div></td>       </tr>       <tr>         <td height="25"><div align="center"><strong>Въведете изискваната информация. Всички полета са задължителни ! </strong></div></td>       </tr>     </table>     <table width="530" border="0" align="center" cellpadding="0" cellspacing="2">       <tr>         <td width="200" rowspan="2"><div align="right">Потребителско име (прякор) : </div></td>         <td><input name="потребител" type="text" class="BlockTextNormal" id="потребител" size="35" maxlength="15">         </td>       </tr>       <tr>         <td class="BlockTextSmall">има значение малки и главни букви (макс. 15 символа) </td>       </tr>       <tr>         <td><div align="right">Вашите имена : </div></td>         <td><input name="име" type="text" class="BlockTextNormal" id="име" size="35"></td>       </tr>       <tr>         <td rowspan="2"><div align="right">Парола : </div></td>         <td><input name="парола1" type="password" class="BlockTextNormal" id="парола1" size="35" maxlength="15">         </td>       </tr>       <tr>         <td><span class="BlockTextSmall">има значение малки и главни букви (макс. 15 символа) </span></td>       </tr>       <tr>         <td><div align="right">Парола (повтори) : </div></td>         <td><input name="парола2" type="password" class="BlockTextNormal" id="парола2" size="35">         </td>       </tr>       <tr>         <td><div align="right">Електронен адрес (email) : </div></td>         <td><input name="мейл" type="text" class="BlockTextNormal" id="мейл" size="35">         </td>       </tr>       <tr>         <td><div align="right">Точен адрес (за доставка) : </div></td>         <td><input name="адрес" type="text" class="BlockTextNormal" id="адрес" size="35">         </td>       </tr>       <tr>         <td><div align="right">Град (за доставка) : </div></td>         <td><input name="град" type="text" class="BlockTextNormal" id="град" size="35">         </td>       </tr>       <tr>         <td><div align="right">Телефон за контакти :</div></td>         <td valign="middle">+359           <select name="код" class="BlockTextNormal" id="код">             <option value="885" selected >0885 МТел</option>             <option value="886" >0886 МТел</option>             <option value="887" >0887 МТел</option>             <option value="888" >0888 МТел</option>             <option value="889" >0889 МТел</option>             <option value="898" >0898 Глобул</option>             <option value="БТК" >БТК</option>           </select>             <input name="телефон" type="text" class="BlockTextNormal" id="телефон" size="20"></td>       </tr>       <tr>         <td colspan="2"><div align="center">           <textarea name="textfield" cols="50" rows="6" wrap="VIRTUAL" class="BlockTextNormal">ОБЩИ УСЛОВИЯ НА "ПЕЧАТНИЦА НИМА" ООД Предварително условие: Ние си запазваме правото да не приемем поръчки със следното съдържание: - расистко - сексистко - нацистко - такова, което накърнява достойнствата на малцинствата или такова, което накърнява основните човешки права на гражданите. Също така си запазваме правото да не изпълним поръчки от организации, които по някакъв начин са свързани с дейностите посочени по-горе. I. Авторско право При поръчка от наш клиент, ние изхождаме от това, че той е носител на съответните авторски права. Всички поръчки се приемат при условие, че клиентът поема отговорността за съответните авторски права, като ние се освобождаваме от всякаква отговорност. II. Заплащане Поръчки се изпълняват след заплащане в брой или по сметка. Всякакви други условия могат да бъдат договорени само лично с клиента. При несъответствие на получател на стоката и получател на сметката двамата отговарят за заплащането солидарно. III. Място на получаване и доставка Нашите цени са цени при получаване на място. При доставка се добавя допълнителна такса съобразно изискванията на нашите партньори. IV. Свободно въвеждане на данни от клиента При поръчка клиентът носи цялата отговорност за верността на данните въведени от него. Това важи и за допуснати правописни или пунктуационни грешки.           </textarea> </div></td>       </tr>       <tr>         <td colspan="2"><div align="left"> &nbsp;                 <input name="условия" type="checkbox" id="условия" value="да" checked>         Приемам Общите условия</div></td>       </tr>       <tr>         <td colspan="2">&nbsp;             <input name="информация" type="checkbox" id="информация" value="да" checked>       Желая да получавам информация от www.nima.bg (оферти, новоприбавени продукти и друго)</td>       </tr>       <tr bgcolor="#9BCDFF">         <td height="30" colspan="2"><div align="center">             <input name="Submit" type="submit" class="Thabutton" onClick="MM_validateForm('потребител','','R','име','','R','парола1','','R','парола2','','R','мейл','','RisEmail','адрес','','R','град','','R','телефон','','R');return document.MM_returnValue" value="Регистрирай ме!">         </div></td>       </tr>       <tr bgcolor="#9BCDFF">         <td height="30" colspan="2"><div align="center">Вашата персонална информация ще бъде защитена и конфиденциална.</div></td>       </tr>     </table> </form> </body> </html> [/code] ident.php: [code]<?php if (isset($_POST['потребител'],$_POST['парола'])) { $user = $_POST['потребител']; $pass = $_POST['парола']; } if (isset($user,$pass)) { include "sql.php"; mysql_connect("$sql_host", "$sql_user_name", "$sql_user_pass"); mysql_select_db("$sql_database"); $login = mysql_query("SELECT * FROM users WHERE `user`='$user' AND `pass`='$pass' LIMIT 1"); while ($row = mysql_fetch_object($login)) {   $user = $row -> user;   $pass = $row -> pass;   $name = $row -> name;   $town = $row -> town;   $adress = $row -> adress;   $tel = $row -> tel;   $mail = $row -> mail;   $tel_type = $row -> tel_type; } if (isset($user,$pass,$name,$adress,$tel,$mail)) {   $_SESSION['user'] = $user;   $_SESSION['pass'] = $pass;   $_SESSION['name'] = $name;   $_SESSION['town'] = $town;   $_SESSION['adress'] = $adress;   $_SESSION['tel'] = $tel;   $_SESSION['tel_type'] = $tel_type;   $_SESSION['mail'] = $mail; } } ?> <div align="center"> <?php   if (!isset($_SESSION['user'],$_SESSION['pass'],$_SESSION['name'],$_SESSION['town'],$_SESSION['adress'],$_SESSION['tel'],$_SESSION['mail'])) {   echo '<table width="548" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">     <tr>       <td height="30"><div align="center">         <p><em>Грешно потребителско име или парола.</em></p>         </div></td>     </tr>     <tr>       <td><div align="center"><a href="index.php?page=users/login">Назад</a></div></td>     </tr>   </table>   '; &
  13. i get the idea but i don't know the code i should write in order to succeed, I'm still learning can u give some php code? thank you very much!
×
×
  • 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.