Jump to content

Chrisj

Members
  • Posts

    551
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Chrisj

  1. Greybox, the pop-up window: http://orangoo.com/labs/GreyBox/ I'd just like to know how I can get it to pop-up not in the center of the page. I'd like it to pop-up on the left side of the page. Is that possible? If so can you help me accomplish this? I was told to look at the CSS styles, but I and others were unsuccessful there. It amy need added code. Any help would be appreciated. Thanks.
  2. In a php script I'm using the Registration page only had fields for name and email address, basically. I added fields, just by copying the code on the page. I added Address1, Address2, City and State. Then I added those fields to the mysql db. However, I need help with two things, when I Submit, and some field happens to be incomplete an error message appears and asks the user to complete. All fields remain filled, except the ones I added. How to I keep my just-added-fields populated, like the rest of the fields? And secondly, when I tested my additions, by registering, my newly added fields info, didn't get added to the db. Your help will be appreciated. <div class="signup-right"> <h1 style="border-bottom: 1px solid #666666;">[var.lang_register_today]!</h1> <form action="join.php" method="post" name="capform" class="FormGeneric" onSubmit="return capCheck(this);"> <div> <div style="margin-left:52px; float:left;"> <b>[var.lang_first_name]:</b> </div> <div style="margin-right:50px; float:right;"> <input type="text" name="first_name" size="20" value="[var.first_name]" /> </div> </div> <br /> <br /> <div> <div style="margin-left:52px; float:left;"> <b>[var.lang_last_name]:</b> </div> <div style="margin-right:50px; float:right;"> <input type="text" name="last_name" size="20" value="[var.last_name]" /> </div> </div> <br /> <br /> <div> <div style="margin-left:52px; float:left;"> <b>Address 1:</b> </div> <div style="margin-right:50px; float:right;"> <input type="text" name="address_1" size="26" value="[var.Address_1]" /> </div> </div> <br /> <br /> <div> <div style="margin-left:52px; float:left;"> <b>Address 2:</b> </div> <div style="margin-right:50px; float:right;"> <input type="text" name="address_2" size="26" value="[var.Address_2]" /> </div> </div> <br /> <br /> <div> <div style="margin-left:52px; float:left;"> <b>City:</b> </div> <div style="margin-right:50px; float:right;"> <input type="text" name="city" size="26" value="[var.city]" /> </div> </div> <br /> <br /> <div> <div style="margin-left:52px; float:left;"> <b>State/Province:</b> </div> <div style="margin-right:50px; float:right;"> <input type="text" name="state" size="26" value="[var.state]" /> </div> </div> <br /> <br /> <div> <div style="margin-left:52px; float:left;"> <b>Zip Code/Mail Code:</b> </div> <div style="margin-right:110px; float:right;"> <input type="text" name="zip_code" size="6" maxlength="5" value="[var.zip_code]" /> </div> </div>
  3. If you're familiar with Greybox, the pop-up window: http://orangoo.com/labs/GreyBox/ I'd just like to know how I can get it to pop-up not in the center of the page. I'd like it to pop-up on the left side of the page. Is that possible? If so can you help me accomplish this? Thanks.
  4. Currently, a vistor to the web site can search by keyword and the script generates a total number of results. I’d like to multiply the number of searched results by a set price, and proceed to Paypal for payment, and then be re-directed to a protected page. If the set price for each searched result is $1, just as an example, and the total number of searched results generated is 29, then process 29 x $1 = $29.00. If the number generated is 29 or more—process $1 x 29, or $1 x30, or $1 x 31, etc. If the number generated is less then 29, charge the minimum price of $29, and the unused paid units get stored in the User account for credit towards future purchases. For example, if the number generated is 9, the User pays the minimum price of $29, and 20 credits are added to his membership account. The next time he visits the web site he searches by keyword, this search generates results, the total number, for example is 12, he pays nothing, and proceeds (to Paypal? or) the protected page, and now has a credit in his account of 8. (20 - 12 = . When he next visits and generates a number, say for example 15, he only has 8 credits in his account, so he must pay another minimum payment of $29, which puts his account at 29 + 8 - 15 = 22 credits on account. Can you give me your thoughts on this?
  5. Can Crystal Reports be used with MySQL? If not, what reporetiung tool do you recommend?
  6. I was provided this code (and some css) to create three boxes on my web site. It was successful. Now what code do I need to add content to these boxes? Thanks. <div class="container1"> </div> <div class="container1"> </div> <div class="container1"> </div>
  7. Thanks for your reply. Can you show me what that might look like, so I get it correct? Thanks
  8. Thanks for your reply. I did just type some text, and it just shows up under the right column. Can you provide some basic code which would add a box that streches across the web page under the left column and right column, from the left to right? Thanks
  9. Thanks for your help. Here is the CSS titled Styles (there is another called thickbox): ** tyle */ .video_box_main { border:0px solid #00FFFF; font-family: Verdana; color: #333333; font-size: 12pt } .default_text_white { font-family: Arial; font-size: 10pt; color: #FFFFFF } .default_text_white_11pt { font-family: Arial; font-size: 11pt; color: #FFFFFF; background-image:url('../images/box_blue_middle.jpg'); background-repeat:repeat; height:25; font-weight:bold } .default_text_blue { font-family: Arial; font-size: 10pt; color: #3366CC; text-decoration:none } .default_menu_blue {font-family: Arial; font-size: 10pt; color:#3366CC ;} .default_menu_blue A { text-decoration:none; font-size: 10pt; color:#3366CC ;} .default_menu_blue A:visited {font-size: 10pt; color="#3366CC"} .default_menu_blue A:hover {font-size: 10pt; color="#3366CC"} .default_menu_blue A:active {font-size: 10pt;} .default_menu_white {font-family: Arial; font-size: 10pt; color:#ffffff ;} .default_menu_white A { text-decoration:none; font-size: 10pt; color:#ffffff ;} .default_menu_white A:visited {font-size: 10pt; color="#ffffff"} .default_menu_white A:hover {font-size: 10pt; color="#ffffff"} .default_menu_white A:active {font-size: 10pt;} .default_menu_gray {font-family: Arial; font-size: 10pt; color:#333333 ;} .default_menu_gray A { text-decoration:none; font-size: 10pt; color:#333333 ;} .default_menu_gray A:visited {font-size: 10pt; color="#333333"} .default_menu_gray A:hover {font-size: 10pt; color="#333333"} .default_menu_gray A:active {font-size: 10pt;} .default_menu_gray_12pt {font-family: Arial; font-size: 12pt; color:#333333 ;} .default_menu_gray_12pt A { text-decoration:none; font-size: 12pt; color:#333333 ;} .default_menu_gray_12pt A:visited {font-size: 12pt; color="#333333"} .default_menu_gray_12pt A:hover {font-size: 12pt; color="#333333"} .default_menu_gray_12pt A:active {font-size: 12pt;} .default_text_blue_8pt { font-family: Arial; font-size: 8pt; color: #3366CC } .default_text { font-family: Arial; font-size: 10pt; color: #333333 } .default_text_9pt { font-family: Arial; font-size: 9pt; color: #333333 } .default_text_8pt { font-family: Arial; font-size: 8pt; color: #333333 } .default_text_shaded_gray1_8pt { font-family: Arial; font-size: 8pt; color: #333333; background-color:#F0F1FF } .table_ads_l_b_r_t {border:1px solid #C0CEEF; } .table_border_l_b_r_t {border:1px solid #C0CEEF; } .table_border_l {border-left: 1px solid #C0CEEF; } .table_border_r {border-right: 1px solid #C0CEEF; } .table_border_t {border-top:1px solid #C0CEEF; } .table_border_l_r {border-left: 1px solid #C0CEEF; border-right: 1px solid #C0CEEF;} .table_border_l_b_r {border-left: 1px solid #C0CEEF; border-right: 1px solid #C0CEEF; border-bottom: 1px solid #C0CEEF} .table_border_l_t_r {border-left: 1px solid #C0CEEF; border-right: 1px solid #C0CEEF; border-top: 1px solid #C0CEEF} .table_border_t_l_b {border-left: 1px solid #C0CEEF; border-top: 1px solid #C0CEEF; border-bottom: 1px solid #C0CEEF} .table_border_t_r_b {border-right: 1px solid #C0CEEF; border-top: 1px solid #C0CEEF; border-bottom: 1px solid #C0CEEF} .warning_box_red {border: 1px solid #FF4242; background-color:#FFDDDD;} .warning_box_green {border: 1px solid #87CC33; background-color:#DDEECC;} .warning_box_green_white {border: 1px solid #87CC33; background-color:#FFFFFF;}
  10. I'm learning it now and asking questions along the way. And specific code help would be appreciated. thanks
  11. Thanks for your reply. I thought I did. What would you suggest?
  12. In the php script that I'd like to modify, it has a left and right column. Underneath these columns, I'd like to add a box for text and images, all the way across the web page, under the two columns. This code below shows the content part of the script page (the header and footer are in another file). I would imagine, to do this, I need to add some code under <!--End Right Column--> correct? Can you provide some basic code which would add a box that streches across the web page under the left column and right column? Any help would be appreciated. Thanks. <!--Begin Left Column--><title>ads</title> <div id="column-left-1"> </div> <!--End Left Column--> <!--Begin Right Column--> <div id="column-right-1"> <!--Begin Login Box--> <div id="login-box"> <!--[onload_300;block=div;when [var.show_login_box]=1;comm]--> <form action="login.php" method="post" accept-charset="UTF-8" class="middletext"> <ul> <li><label><font class="font4_13">[var.lang_user_name]:</font></label><span class="username"><input type="text" name="user_name_login" size="16" style="width:138px;" /></span></li> <li> </li> <li><label><font class="font4_13">[var.lang_password]:</font></label><span class="password"><input type="password" name="password_login" size="16" style="width:138px;" /></span></li> <li> </li> <li> <label><font class="font4_13">[var.lang_how_long]:</font></label> <span class="howlong"> <select name="cookie_time"> <option value="1440">[var.lang_1_day]</option> <option value="10080">[var.lang_1_week]</option> <option value="43200">[var.lang_1_month]</option> <option value="-1" selected="selected">[var.lang_forever]</option> </select> </span> <input type="submit" value="[var.lang_login_now]" class="button-form" /> </li> <li> </li> <li> <a href="login.php">[ [var.lang_password_reminder] ]</a> <b>|</b> <a href="[var.register_menu_link]">[ [var.lang_register_today] ]</a> <input type="hidden" name="submitted" value="yes" /> <input type="hidden" name="remember_me" value="remember_me" /> </li> </form> </ul> </div> <!--End Login Box--> <!--End Site Stats--> </div> <!--End Right Column-->
  13. I'd like to split this page into 3 columns, but only the lower 3/4th of the page, below the Carousel section. (This code doesn't have the header or footer included). Can someone guide me in this? Thanks. I look forward to your reply(s). <!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=utf-8" /> <title>Untitled Document</title> <link href="css/main.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="[var.base_url]/javascripts/ahah.js" ></script> <script type="text/javascript" src="[var.base_url]/javascripts/swfobject.js"></script> </head> <body class="MainBody_TEMP"> <!--Start of Left column --> <div id="ContentSplitContainer_left3"> <!-- start of now showing --> <div id="IndexNowShowing"> <object type="application/x-shockwave-flash" data="watchingnow.swf?x=watchingnow.php&t=Videos being watched right now..." width="550" height="115" align="top"> <param name="allowScriptAccess" value="sameDomain"> <param name="movie" value="watchingnow.swf?x=watchingnow.php&t=Videos being watched right now..."> <param name="quality" value="high"> <param name="bgcolor" value=""> </object> </div> <!--end of now showing --> <!-- Start of Carousel --> <div id="mycarousel" class="carousel-component"> <div class="carousel-prev"> <img id="prev-arrow" class="left-button-image" src="carousel_files/images/left-enabled.gif" alt="Previous"/> </div> <div class="carousel-next"> <img id="next-arrow" class="right-button-image" src="carousel_files/images/right-enabled.gif" alt="Next Button"/> </div> <div class="carousel-clip-region"> <ul class="carousel-list"> <li id="mycarousel-item-1"><a href="[var.base_url]/play.php?vid=[mp.indexer]"><img width="116" height="90" src="[var.base_url]/uploads/thumbs/[mp.video_id;block=li].jpg" alt="[mp.title:block=td]"/></a> <!--[mp.title;block=div;ope=max:15;comm]--> <br /> <!--[mp.date_uploaded;block=div;comm]--> <br /> </li> </ul> </div> </div> <!-- End of Carousel --> <!-- Start of videos list --> <div id="IndexVideoListContainer"> <div id="indexajax"> <div id="IndexVideoDetails"> <ul class="VideoDetails_All_List"> <li><a href="play.php?vid=[blkfeatured.indexer;block=div]"><img src="uploads/thumbs/[blkfeatured.video_id;block=div].jpg" alt="video pic" width="120" height="90" border="0" class="IndexVideoDetails_Thumb" /></a></li> <li class="font4_12"></li> </ul> <ul class="VideoDetails_Info_List"> <li><a href="play.php?vid=[blkfeatured.indexer;block=div]"> <span class="font4_14"><!--[blkfeatured.title;block=div;ope=max:45;comm]--></span> </a></li> <li> <!--[blkfeatured.description;block=div;ope=max:45;comm]--> </li> <li><span class="font4_12">Rating </span><img border="0" src="images/[blkfeatured.star1;block=div]" width="21" height="21" alt="1 Star"><img border="0" src="images/[blkfeatured.star2;block=div]" width="21" height="21"><img border="0" src="images/[blkfeatured.star3;block=div]" width="21" height="21"><img border="0" src="images/[blkfeatured.star4;block=div]" width="21" height="21"><img border="0" src="images/[blkfeatured.star5;block=div]" width="21" height="21"> <span class="font4_12">Views:</span> ( <!--[blkfeatured.number_of_views;block=div;comm]--> ) <span class="font4_12">Duration:</span> ( <!--[blkfeatured.video_length;block=div;ope=max:45;comm]--> )</li> <li><span class="font4_12">Category:</span> <a href="category_home.php?cid=[blkfeatured.channel;block=div]"> <!--[blkfeatured.channel;block=div;ope=max:20;comm]--> </a> <span class="font4_12">Uploaded:</span> <!--[blkfeatured.date_uploaded;block=div;comm]--> </li> <li> </li> </ul> <div class="clearfix2"></div> </div> </div> <br /> </div> <!--end of video list --> </div> <!--End of Left column --> <!--start of right column --> <div id="ContentSplitContainer_right2"> <!--random video start --> <div id="IndexPreviewBox_1"> <!-- Ads --> <div id="IndexPreviewBox_2"> <div id="IndexPreviewBox_content"> <ul class="IndexPreviewBox_list"> <li> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8" name="theMediaPlayer" width="300" height="280" id="theMediaPlayer"> <param name=movie value="flvplayer.swf"> <param name=quality value="high"> <param name=bgcolor value="#FFFFFF"> <param name=allowFullScreen value="false"> <param name=swLiveConnect value="true"> <param name=allowScriptAccess value="sameDomain"> <param name="FlashVars" value="file=uploads/[var.video_play]&width=315&height=280&displaywidth=315&displayheight=260&overstretch=true&showfsbutton=false&image=uploads/thumbs/[var.video_thumb]&backcolor=0xFFFFFF"> <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="300" height="280" bgcolor="#FFFFFF" name="theMediaPlayer" src="flvplayer.swf" flashvars="file=uploads/[var.video_play]&width=315&height=280&displaywidth=315&displayheight=260&overstretch=true&showfsbutton=false&image=uploads/thumbs/[var.video_thumb]&backcolor=0xFFFFFF"></embed> </object> </li> </ul> </div> </div> </div> <!--random video end --> <!-- start of login box - will auto hide when logged in--> <div id="IndexLoginGoldBox_1"> <!--[onload_300;block=div;when [var.show_login_box]=1;comm]--> <div id="IndexLoginGoldBox_2"> <div id="IndexLoginGoldBox_content"> <div id="RelatedVideosTitle"> <span class="font5_14">Login and start Uploading!</span></div> <ul class="IndexLoginGoldBox_list"> <form name="login" action="login.php" method="POST" class="FormIndexLogin"> <li>Username <input type="text" name="user_name_login" size="20" /> </li> <li>Password <input type="password" name="password_login" size="20" /> </li> <li> <input type="hidden" name="submitted" value="yes" /> <input type="submit" value="Login Now" name="logi_n" /> </li> </form> </ul> </div> </div> </div> <!-- end of login box --> <!--ads right start --> <div id="IndexGrayBox_1"> <!-- Ads --> <div id="IndexGrayBox_2"> <div id="IndexGrayBox_content"> <ul class="IndexGrayBox_list"> <li> <!--[var.ads_right;htmlconv=no;comm]--> </li> </ul> </div> </div> </div> <!--ads right end --> </div> <!--end of right column --> <div class="clearfix2"></div> </body>
  14. Can someone tell me if it's possible to use CloudFront with PHPmotion (a php video-sharing script)? When videos are searched with keywords in the PHP script, how can videos from CloudFront & S3 appear on the site? Would it be a tough integration? Do you know where i can get help and more info regarding this? Thanks.
  15. I'm using a PHP script and am adding a Paypal link, so when the user/purchaser returns to the PHP script he is routed to a protected page that only users who have made the payment can access. Can someone help me with the protected page part? Some clues, any help would be appreciated.
  16. Yes, I want to modify this script to require they login with their email and password, completely eliminating the email address.
  17. I'm using script program with a Create Account Page. It asks for User Name, Password, Email Address etc., I want the User Name to be the Users Email Address, is there a way to combine these, so that the User Name is the email address? Or is it possible to somehow require that the user enter an email address as a User Name? And then store the user name where the email address would be stored? Thank you. Here is the code: <?php global $account; ?> <form method="POST" action="index.php"> <table align="center" cellpadding="1" width="70%" height="100%"> <tr><td> </td></tr> <tr><td> </td></tr> <input class='field' type='hidden' name='command' value='account'> <input class='field' type='hidden' name='param' value='signup'> <tr><td colspan='2' class='pageTitle'><div class='hLine'>Create new account</div></td></tr> <tr><td> </td></tr> <tr> <td class='fieldLabel' width="30%">Membership type</td> <td align="center">[account_type_panel]</td></tr> <tr><td> </td></tr> <tr> <td class='fieldLabel' width="30%">User Name</td> <td><input class='field' type='text' size='30' maxlength="30" name='user_name' value='<?=$account->user_name ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('user_name') ?></span></td> </tr> <tr> <td class='fieldLabel'>Password</td> <td><input class='field' type='password' size='30' maxlength="30" name='password' value='<?=$account->password ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('password') ?></span></td> </tr> <tr> <td class='fieldLabel'>Re-enter Password</td> <td><input class='field' type='password' size='30' maxlength="30" name='reenter_password' value='<?=$account->reenter_password ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('reenter_password') ?></span></td> </tr> <tr> <td class='fieldLabel'>Name </td> <td ><input class='field' type='text' size='40' maxlength="50" name='first_name' value='<?=$account->first_name ?>'> <span class='requiredField'> *&nbsp</span><span class='errorMessage'><?=$account->get_error('first_name') ?></span></td> </tr> <tr> <td class='fieldLabel'>business / company name</td> <td><input class='field' type='text' size='40' maxlength="50" name='last_name' value='<?=$account->last_name ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('last_name') ?></span></td> </tr> <tr><td> </td></tr> <tr> <td class='fieldLabel'>Email address</td> <td><input class='field' type='text' size='40' maxlength="50" name='email' value='<?=$account->email ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('email') ?></span></td> </tr> <tr> <td class='fieldLabel'>Address</td> <td><input class='field' type='text' size='40' maxlength="70" name='address' value='<?=$account->address ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('address') ?></span></td> </tr> <tr> <td class='fieldLabel'>Address 2</td> <td><input class='field' type='text' size='40' maxlength="70" name='address_second' value='<?=$account->address_second ?>'></td> </tr> <tr> <td class='fieldLabel'>City</td> <td><input class='field' type='text' size='40' maxlength="50" name='city' value='<?=$account->city ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('city') ?></span></td> </tr> <tr> <td class='fieldLabel'>Zip/Postal code</td> <td><input class='field' type='text' size='35' maxlength="35" name='zip_postal_code' value='<?=$account->zip_code ?>'> <span class='requiredField'> * </span><span class='errorMessage'><?=$account->get_error('zip_code') ?></span></td> </tr> <tr> <td class='fieldLabel'>Phone Number</td> <td><input class='field' type='text' size='35' maxlength="35" name='phone' value='<?=$account->phone ?>'></td> </tr> <tr> <td class='fieldLabel'>Mobile Phone Number</td> <td><input class='field' type='text' size='35' maxlength="35" name='mobile_phone_number' value='<?=$account->mobile_phone_number ?>'></td> </tr> <tr><td> </td></tr> <tr><td> </td></tr> <tr><td colspan="2" class='hLine' align="right"> <span class='requiredField'> *</span> Required field</td></tr> <tr><td colspan='2' align="right"><input class='button' type='submit' value='create'></td></tr> <tr><td colspan="2"> </td></tr> </table> </form>
  18. I have a web site host who provides MYSQL with the hosting package. And I have a script entitled: Member Mgmt Script, to manage users/members who register with my web site. I can set up most features of this script, except I know very little about setting up databases. The Members Mgmt script install instructions simply say: "Set database connection details in db_config.php". Can someone tell me how to "set database connection details in db_config.php"? Here is the db_config.php file, thanks: <?php /** * file: db_config.php * * description: init db connection */ $db_name = "database name"; // database name $db_user_name = "database user name"; // database user name $db_user_password = "database password"; // datanase user password $db_type = "mysql"; // note: for use mysqli lib set db_type = mysqli $host = "localhost"; ?>
  19. I need a script, for my web site. Thanks. This is what I need: Log-in page If user can’t log-in, register and continue to Paypal Subscription Payment Once payment is made, users get re-directed to log-in page. Only registered/paid users can log-in. Registered User info and Order info (subscription payment, date,etc)is added to database. If Subscription expires without payment, user is blocked from logging-in. Log-in privledge is re-instated once current subscription payment is received. Log-in is users email address and password. User can retreive password or user name if forgotten. Log-in submission re-directs the user to the upload/browser box page. Upload Page Paid/registered logged-in users can access this page, only. Upload box only accepts a limited number of vald extensions. File is checked for viruses. File size & date is added to the database File name is changed to the users log-in name.extenstion. File is directed to a specific directory.
  20. I'm hoping someone might be interested in helping me add add a browse/upload-file field into an existing log-in page. Plus, store the file size in a database to keep track of how much each registered user uploads, change the file name, and limit the uploaded file to a handful of extensions. I have this code: <?php if (isset($_SESSION['customer_id'])) { echo ' <form action="/WHEREVER IM GOING/" enctype="multipart/form-data" method="post"> <p> Please specify a filebr /> <input type="file" name="myfile" size="40"> </p> <p> <input type="submit" value="Send"> </p> </form>'; } if (!empty($_FILES)) { $connection = mysql_connect("hostname", "username", "password"); $db = mysql_select_db("dbname", $connection); mysql_query("INSERT INTO upload_track (customer_id, filesize) VALUES (" . $_SESSION['customer_id'] . ", " . $_FILES['myfile']['size'] . ")", $connection); } ?> And this code: move_uploaded_file([uploadedfile],[path/to/filename.ext]); and the log-in page code below. I just don't know how to put them together to make them function together with what I'd like the form to do, as outlined above. Would anyone like to provide me with some assistance/guidance here? Thank you. <?php /* +-------------------------------------------------------------------------- | login.inc.php | ======================================== | Start the session +-------------------------------------------------------------------------- */ if (eregi(".inc.php",$HTTP_SERVER_VARS['PHP_SELF']) || eregi(".inc.php",$_SERVER['PHP_SELF'])) { echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>"; exit; } $_GET['act'] = treatGet($_GET['act']); if($_GET['act']=="login" && isset($_POST['username']) && isset($_POST['password'])){ $_POST['username'] = treatGet($_POST['username']); $_POST['password'] = treatGet($_POST['password']); $query = "SELECT customer_id FROM ".$glob['dbprefix']."CubeCart_customer WHERE email=".$db->mySQLSafe($_POST['username'])." AND password = ".$db->mySQLSafe(md5($_POST['password']))." AND type>0"; $customer = $db->select($query); if($customer==FALSE) { if($db->blocker($_POST['username'],$ini['bfattempts'],$ini['bftime'],FALSE,"f")==TRUE) { $blocked = TRUE; } } elseif($customer[0]['customer_id']>0) { if($db->blocker($_POST['username'],$ini['bfattempts'],$ini['bftime'],TRUE,"f")==TRUE) { $blocked = TRUE; } else { $customerData["customer_id"] = $customer[0]['customer_id']; $update = $db->update($glob['dbprefix']."CubeCart_sessions", $customerData,"sessId=".$db->mySQLSafe($_SESSION['ccUser'])); $_POST['remember'] = treatGet($_POST['remember']); if($_POST['remember']==1){ setcookie("ccRemember","1",time()+$config['sqlSessionExpiry'], $GLOBALS['rootRel']); } // redirect // "login","reg","unsubscribe","forgotPass" if(isset($_GET['redir']) && !empty($_GET['redir']) && !eregi("logout|login|forgotPass|changePass",base64_decode($_GET['redir']))){ header("Location: ".str_replace("amp;","",treatGet(base64_decode($_GET['redir'])))); exit; } else { header("Location: ".$GLOBALS['rootRel']."index.php"); exit; } } } elseif(eregi("step1",base64_decode($_GET['redir']))) { header("Location: ".$GLOBALS['rootRel']."cart.php?act=step1"); exit; } } $login = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/content/login.tpl"); $login->assign("LANG_LOGIN_TITLE",$lang['front']['login']['login']); $login->assign("VAL_SELF",treatGet($_GET['redir'])); $login->assign("LANG_USERNAME",$lang['front']['login']['username']); if(isset($_POST['username'])){ $login->assign("VAL_USERNAME",$_POST['username']); } $login->assign("LANG_PASSWORD",$lang['front']['login']['password']); $login->assign("LANG_REMEMBER",$lang['front']['login']['remember_me']); $login->assign("TXT_LOGIN",$lang['front']['login']['login']); $login->assign("LANG_FORGOT_PASS",$lang['front']['login']['forgot_pass']); if(isset($_POST['remember']) && $_POST['remember']==1) $login->assign("CHECKBOX_STATUS","checked='checked'"); if($ccUserData[0]['customer_id'] > 0 && isset($_POST['submit'])){ $login->assign("LOGIN_STATUS",$lang['front']['login']['login_success']); } elseif($ccUserData[0]['customer_id'] > 0 && !isset($_POST['submit'])) { $login->assign("LOGIN_STATUS",$lang['front']['login']['already_logged_in']); } elseif($ccUserData[0]['customer_id'] == 0 && isset($_POST['submit'])) { if($blocked == TRUE) { $login->assign("LOGIN_STATUS",sprintf($lang['front']['login']['blocked'],sprintf("%.0f",$ini['bftime']/60))); } else { $login->assign("LOGIN_STATUS",$lang['front']['login']['login_failed']); } $login->parse("login.form"); } else { $login->assign("LOGIN_STATUS",$lang['front']['login']['login_below']); $login->parse("login.form"); } $login->parse("login"); $page_content = $login->text("login"); ?>
×
×
  • 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.