Jump to content

Chrisj

Members
  • Posts

    551
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Chrisj

  1. Someone had helped me set up a basic Contact Form that simply sends the info to an email address upon submission, and helped  add the functionality of a CAPTCHA, and a function to Agree To Terms.

    Well, instead of Captcha, a simple question is posed in the Form: Is Fire Hot or Cold?

     

    Anyway, I plugged in the suggested lines of code into the html form, and the accompanying very simple php handler (below).

     

    After answering the question (wrong), the user exits to a blank page that simply says "wrong answer". I'd like to have the words "Wrong Answer" appear on the Contact Form page, instead of exiting.

     

    And I'd like to add a link to the Agree To Terms, so the user can read the terms they are agreeing to, and also not allow a user to submit/proceed until he agrees.

     

    I'm sure these are very simple tweaks. Please let me know if you're interested in helping me "have the words "Wrong Answer" appear on the Contact Form page, instead of exiting" and "add a link to the Agree To Terms, so the user can read the terms they are agreeing to, etc.".

     

    Thanks

     

    <?php
    $mailto		= 'email@email.com';
    $mailsubj	= "Contact Form submission";
    $mailhead	= "From:CForm\n";
    $mailbody 	= "--- Contact form results ---\n";
    
    foreach($_REQUEST as $key => $value)
    {
    if($key != 'PHPSESSID')
    	{
    	$mailbody .= $key.": ".$value."\n";
    	}
    }
    if(isset($_POST['ans']) && $_POST['ans']!='hot') exit('Wrong answer');
    
    if(empty($_POST['agree']) || $_POST['agree'] != 'agree')
    {
    echo "If you agree with the terms, check the Agree check box";
    exit;
    }
    
    $mailbody .= date('Y-m-d H:i:s',strtotime("now"));
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    echo "<h2>Thanks!</h2>"
    //print_r($_REQUEST);
    ?>
    
    

  2. Thanks for your reply. To reply to your "need to find where the file is being created", the file is being "created" in the html (below - index.html). the script names each recording with the file name "VideoZ". Each time a recording is made it is saved as VideoZ, therefore replacing the previous recording each time. I'd like to save all recordings, not just have the latest one replace the previous one. Do I need to add some php somewhere to accomplish giving each recording a unique name? Any help will be appreciated.

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    	<title>recorder</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<script type="text/javascript" src="js/swfobject.js"></script>
    </head>
    <body bgcolor="#ffffff">
    	<div id="recorder"></div>
                  <script type="text/javascript">
                   // <![CDATA[
                   var so = new SWFObject("recorder.swf", "recorder", "620", "470", "9", "#000000");
    		   so.addParam('flashvars','filename=VideoZ&rtmpPath=rtmp://67.xxx.xxx.xxx/vid/&finishURL=player.html')
                   so.write("recorder");
                   // ]]>
                   </script>
    
    
    </body>
    </html>

  3. I have purchased a script that allows a web page visitor to record via their web cam.

    When the user selects 'stop recording" he's automatically taken to the player page and can play the video named VideoZ.

     

    The Player page code is below.

     

    What code can I add that will rename the file name VideoZ and give the recording a unique file name upon the user selecting "Save"?

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    	<title>check recorded video</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<script type="text/javascript" src="js/swfobject.js"></script>
    </head>
    
    <body bgcolor="#ffffff">
    	<div id="player"></div>
                 <script type="text/javascript">
                   // <![CDATA[
                   var so = new SWFObject("player.swf", "player", "640", "480", "9", "#000000");
          	  so.addParam('flashvars','file=VideoZ&streamer=rtmp://67.xxx.xxx.xxx/videos');
                   so.write("player");
                   // ]]>
                   </script>
    </body>
    </html>

  4. I'm using this php web script and would like to know what happens upon log-in. I see "will auto hide when logged in". Does this mean the log-in box disappears after log-in? Does it get replaced with something? Can you read the code below and tell me? If so, what replaces it? Thanks.

     

    <!-- 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 -->

  5. With some great forum help my nav menu shows nav options in the main menu, and when the user logs-in, it lines up additional menu choices all on a horizontal line. The issue I'd like to fix is to make the "log-in" menu choice disappear when the user is logged-in. If you can overlook all the font tags, in the code below, I'd greatly appreciate any help.

     

    <!--Begin Sub-Navigation. This only appears when a user is logged in.-->
    <div class="sub-nav">
    
    <img src="themes/default/images/arrow-red.gif"> <a href="members/[var.user_name]"><font color="#333333" face="verdana">my account</font></a> <img src="themes/default/images/arrow-red.gif">
    <a href="credits.php"><font color="#333333" face="verdana">[var.lang_my_credits]: [var.member_credits]</font></a> <img src="themes/default/images/arrow-red.gif"> 
    <a href="logout.php"><font color="#000000" face="verdana">log out</font></a>  
    
    <!--[onload;block=div;when [var.loggedin]=1;comm]-->
    
    </div>
    
    <!--Begin Sub-Navigation. This only appears when a user is logged in.-->
    <div class="sub-nav1">
    <p class="account">
    <span id="welc"><span style="color:#333333; font-size: 12px; font-face=verdana;">  Welcome! You Are Now Logged In.</span></p>
    <!--[onload;block=div;when [var.loggedin]=1;comm]-->
    </div>
    
    <div class="menu1">
    
      <a href="[var.base_url]"> <font color="#333333" font face="verdana">home</font></a>
      <a href="page.php?page=16"><font color="#333333" face="verdana">faq</font></a>
      <a href="[var.base_url]/join.php"><font color="#333333" face="verdana">register</font></a> 
       <a href="[var.login_out_link]"><font color="#333333" face="verdana">log in</font></a>
      <a href="page.php?page=9"><font color="#333333" face="verdana">search</font></a>
       <a href="page.php?page=6"><font color="#333333" face="verdana">upload</font></a>
    
    </div>

     

    .menu1 {
        font-size: 11px;
        font-family: verdana;
        text-align: right;
        float: right;
        color: #333333;
    margin: 0px 5px 0px 0px;
    padding: 0px 0px 0px 0px;
    }
    
    
    .sub-nav {
        font-size: 11px;
        font-family: verdana;
        text-align: right;
        color: #333333;
        margin: 0px 22px 0px 0px;
        padding: 0px 0px 0px 0px;
    }
    
    .sub-nav-links {
      color: #;
      font-size: 14px;
      margin: 0px 0px -20px 0px;
    }
    
    .sub-nav1 {
        font-size: 11px;
        font-family: verdana;
        text-align: right;
        float: left;
        color: #333333;
        margin: 0px 22px 0px 0px;
        padding: 0px 0px 0px 0px;
    }
    
    
    .sub-nav {float:right}
    
    .sub-nav1 p {
    margin:0
    font-size: 11px;
    font-family: verdana;
    color: #333333;
    }
    
    #welc{ float left;
    }
    
    .account
    font-size: 11px;
    font-family: arial;
    color: #333333;
    } 
         
    

  6. This is the php file code to a video jukebox add-on script, for a popular web video script.

    I'd like to modify it so the "Click Here" text font and color can be changed. Can you help or suggest what I can do to accomplish this?

     

    Thanks

     

    <?php include("../classes/config.php");?>
    <artworkinfo>
    <?
    $query = "select * from videos where viewtime<>'0000-00-00 00:00:00' and public_private='public' AND approved ='yes' AND promoted ='yes'  limit 10"; // Max 10!";
    $db=mysql_connect ($dbhost,$dbusername,$dbpassword) or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ($dbname);
    
    $num_rows = mysql_num_rows(mysql_query("select * from videos WHERE public_private = 'public' AND promoted = 'yes' AND approved ='yes'"));
    
    $result = mysql_query($query) or die ('Query Error: ' . mysql_error());
    while ($results = mysql_fetch_array($result)) {
    ?>
    
    <albuminfo>
    	<artLocation>../uploading/thumbs/<?=$results['video_id']; ?>.jpg</artLocation>
                    <artist>Click Here!!</artist>
    	<albumName><?=$results['title']; ?></albumName>
    	<artistLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</artistLink>
    	<albumLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</albumLink>
    </albuminfo>
    <?
    }
    mysql_close();
    
    ?>
    
    </artworkinfo>

  7. I'm using this web script that works successfully. It has a section where I can add a text box to appear upon a web user log-in. Instead, what I'd like to do is make the log-in box (form) disappear as soon as the user logs-in. Can you tell where(how) I can change this code to accomplish that? Thanks for any help.

     

    <br/>
    <form action="login.php" method="post" accept-charset="UTF-8" class="middletext">
          <label><font class="font4_15">Username</font></label><span class="username"><input type="text" name="user_name_login" size="9" style="width:70px;" />
      <label><font class="font4_15">Password</font></label><span class="password"><input type="password" name="password_login" size="9" style="width:70px;" />
    <input type="submit" value="[var.lang_login_now]" class="btn_vid1" /></a><!--<a href="login.php"></a>-->
    <input type="hidden" name="submitted" value="yes" />
    <input type="hidden" name="remember_me" value="remember_me" />
    </form>
    </td></tr></table>
    
    <!--Begin Text Box-->
      <!--<div id="txt-box">-->
      <table id="tabX44">
          				<tbody>
    			<tr><td>
      <!--<div class="header-narrow">Text Box</div>-->
      <div class="txt-narrow">
    
      </div>
      <!--<div class="container-narrow-bottom"></div>-->
      <!--[onload_337;block=div;when [var.show_login_box]!=1;comm]-->
            </td></tr>
      	  				</tbody>
    			</table>
      <!--</div>-->
      <!--End Text Box-->

  8. Thanks for those replies. Live host testing would be preferable because I need to know the changes work with the script. Such as making changes to the search functioning. As I've named the files in my first post, would you be interested in giving me an example of what I would add to the .htaccess file?

     

    Thanks again

  9. I'm using a popular PHP script for my web site, which uses main_1.htm for the header and footer, and inner_index.htm for the main part of the home page. Also, of course it has index.php.

     

    How can I set up a duplicates of these files to work on and test changes to the home page, before I actually deploy the changes on to my live site's home page?

     

    Thanks

  10. In my registration page the Company name field is required, how do I un-require it?

    Here is the code. thanks

     

    <?php
    
    error_reporting (0);
    
    include_once ('classes/config.php');
    
    include_once ('includes/reserved_names.php');
    
    // define access for loading non display php files
    
    define('access',true);
    
    
    $ahah			= 1;
    
    $show_register	= '';
    
    $load_ajax		= '';
    
    $form_submitted	= '';
    
    $action		= '';
    
    $new_user_name	= '';
    
    $account_type 	= '';
    
    $first_name		= '';
    
    $last_name 		= '';
    
    $Company		= '';
    
    $Address_1     = '';
    
    $Address_2     = '';
    
    $City     = '';
    
    $State     = '';
    
    $email_address 	= '';
    
    $email_address2 	= '';
    
    $user_name 		= '';
    
    $password 		= '';
    
    $confirm_password = '';
    
    $country_list	= '';
    
    $dob_month		= '';
    
    $dob_day		= '';
    
    $dob_year		= '';
    
    $zip_code		= '';
    
    $birthday		= '';
    
    $error_message 	= '';
    
    $checked 		= '';
    
    
    
    $show_register	= 1;
    
    $load_ajax		= 1;
    
    $procede 		= true;
    
    $action		= mysql_real_escape_string( $_GET['action'] );
    
    $new_user_name	= mysql_real_escape_string( $_GET['new_user_name'] );
    
    $site_name 		= mysql_real_escape_string($config['site_name']);
    
    $form_submitted	= mysql_real_escape_string( $_POST['form_submitted'] );
    
    
    
    if ( $action == 'check_user' ) {
    
    $new_user_name	= trim(strtolower($new_user_name));
    
    if ( $new_user_name == '' ) {
    
    	echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['fill_all_fields']."</b></font>";
    
    	die();
    
    }
    
    if ( strlen($new_user_name) < 4 ) {
    
    	echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['username_4_chars']."</b></font>";
    
    	die();
    
    }
    
    
    
    // check against reserved names e.g. -> admin etc... or adult words ban
    
    if ( in_array( $new_user_name, $reserved_names ) ) {
    
    	echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['username_not_allowed'] ."";
    
    	die();
    
    }
    
    
    
    $sql		= "SELECT user_name FROM member_profile WHERE user_name = '$new_user_name'";
    
    $query	= @mysql_query($sql);
    
    $count	= @mysql_num_rows($query);
    
    
    
    if ( $count > 0 ) {
    
    	echo "<font size=\"2\"><b>$new_user_name</b></font><font color=\"#EE0000\" size=\"2\"> <b>=> $lang_not_available</b></font>";
    
    } else {
    
    	echo "<font size=\"2\"><b>$new_user_name</b></font><font color=\"#00DD00\" size=\"2\"> <b>=> $lang_available </b></font>";
    
    }
    
    
    
    @mysql_free_result($result);
    
    @mysql_close();
    
    die();
    
    }
    
    
    
    if ( $action == 'show_country' ) {
    
    $country_fields_all	= '';
    
    $show_fields		= '';
    
    $country_list 		= file('includes/country.list');
    
    
    
    foreach ( $country_list as $country_select )
    
    {
    
    	$country_fields_all = $country_fields_all . $country_select;
    
    }
    
    
    
    $show_fields  = '<div style="margin-left:30px; float:left;"><b>'.$lang_country.':</b></div>';
    
    $show_fields .= '<div style="margin-left:95px; float:left;" id="country_list">';
    
    $show_fields .= '<select class="FormSpecialInput_1" id="country_list" name="country_list" style="font-size: 9pt; width:128px; height:20px; font-weight:bold; color:#444444; letter-spacing: 1; border: 1px solid #DFDCDC; background-color: #FDFDFD">';
    
    $show_fields .= $country_fields_all;
    
    $show_fields .= '</select></div>';
    
    
    
    echo $show_fields;
    
    die();
    
    }
    
    
    
    if ( $procede == true ) {
    
    
    
    $account_type 	= 'Standard';
    
    $first_name		= trim(mysql_real_escape_string( $_POST['first_name'] ));
    
    $last_name 		= trim(mysql_real_escape_string( $_POST['last_name'] ));
    
    $Company 		= trim(mysql_real_escape_string( $_POST['Company'] ));
    
    $Address_1     = trim(mysql_real_escape_string( $_POST['Address_1'] ));
    
    $Address_2     = trim(mysql_real_escape_string( $_POST['Address_2'] ));
    
    $City     = trim(mysql_real_escape_string( $_POST['City'] ));
    
        $State     = trim(mysql_real_escape_string( $_POST['State'] ));
    
        $email_address 	= trim(mysql_real_escape_string( $_POST['email_address'] ));
    
    $email_address2 	= trim(mysql_real_escape_string( $_POST['email_address2'] ));
    
    $user_name 		= trim(mysql_real_escape_string( $_POST['user_name'] ));
    
    $password 		= trim(mysql_real_escape_string( $_POST['password'] ));
    
    $confirm_password = trim(mysql_real_escape_string( $_POST['confirm_password'] ));
    
    $country_list	= trim(mysql_real_escape_string( $_POST['country_list'] ));
    
    $dob_month		= (int) mysql_real_escape_string( $_POST['dob_month'] );
    
    $dob_day		= (int) mysql_real_escape_string( $_POST['dob_day'] );
    
    $dob_year		= (int) mysql_real_escape_string( $_POST['dob_year'] );
    
    $zip_code		= (int) mysql_real_escape_string( $_POST['zip_code'] );
    
    
    
    if ( $_POST['terms'] == 'yes' ) {
    
    	$checked = 'checked=\"checked\"';
    
        		$procede = true;
    
    
    
    } else {
    
    	$procede = false;
    
        		$error_message = $config['agree_to_terms'];
    
    }
    
    
    
    // dDB birthday must be this format =>2008-09-17
    
    $birthday		= $dob_year .'-'. $dob_month .'-'. $dob_day;
    
    
    
    
    
    
    
               foreach ($_POST as $key => $value) {
    
           if (!isset($value) || ($value == '')) {
    
                 $display_key = @str_replace('_', ' ', $key);
    
                 if ( $display_key == 'zip code' && $value == '' ) {
    
                  $value = 'none';
    
                 } else if ($key != 'Address_2') {
    
                  $error_message = $error_message . ' - ' . $display_key . '  '.$lang_required.' ';
    
                  $procede = false;
    
                 }
    
    
    
            	} else {
    
    
    
            	      if ( $key == 'email_address2' ) $key = 'email_address';
    
    
    
              	      if ( $key !== 'email_address'  && (!eregi("^[ _a-zA-Z0-9-].*$", $value)) ) {
    
                		$display_key = @str_replace('_', ' ', $key);
    
                    		$error_message = $error_message . ' - ' . $display_key . ' '.$config['invalid_email_text'].' ';
    
                    		$procede = false;
    
                	}
    
    
    
                	if ( $key == 'email_address' && !eregi("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-z]{2,3})$", $value) ) {
    
                		$display_key = @str_replace('_', ' ', $key);
    
                    		$error_message = $error_message . ' - ' . $display_key . ' '.$config['invalid_email_format'].' ';
    
                    		$procede = false;
    
                	}
    
    
    
                	if ( $key == 'user_name' ) {
    
    
    
                		// check against reserved names e.g. -> admin etc... or adult words ban
    
                		if ( in_array( $user_name, $reserved_names ) ) {
    
                			$display_key = @str_replace('_', ' ', $key);
    
                			$error_message = $error_message . ' ' .$config['username_not_allowed'] . ' !';
    
                			$procede = false;
    
                		}
    
                	}
    
    
    
            	}
    
        	}
    
    }
    
    
    
    // checking if emails match
    
    if ( $procede == true ) {
    
    if ( $email_address !== $email_address2 ) {
    
          	$error_message = ' '.$config['emails_do_not_match'];
    
            	$procede = false;
    
        	}
    
    }
    
    
    
    // checking if passwords match
    
    if ( $procede == true ) {
    
    if ($confirm_password !== $password) {
    
          	$error_message = ' '.$config['password_do_not_match'];
    
            	$procede = false;
    
        	}
    
    }
    
    
    
    // checking if username and email is unique
    
    if ( $procede == true ) {
    
    
    
    $sql = "SELECT user_name, email_address FROM member_profile";
    
        	$query = @mysql_query($sql);
    
    
    
    while ($result = (@mysql_fetch_array($query))) {
    
    
    
          	if ( !empty($result['user_name']) || !empty($result['email_address']) ) {
    
    
    
          		// case insensitive login and registration
    
            		$reg_user_name	= strtolower($user_name);
    
            		$db_user_name 	= strtolower($result['user_name']);
    
    
    
                	if ($db_user_name == $reg_user_name) {
    
                    		$error_message = ' '.$config['username_is taken'];
    
                    		$procede = false;
    
                	}
    
                	if ( $result['email_address'] == $email_address ) {
    
                    		$error_message = $error_message . ' -'.$config['email_already_exists'];
    
                    		$procede = false;
    
                    	}
    
               }
    
        }
    
    }
    
    
    
    // if any errors display error message => [var.message_type] - [var.error_message]
    
    if ($procede == false && $form_submitted == "yes") {
    
    $message_type	= $lang_error;
    
        	$blk_notification = 1;
    
        	$show_signup = 1;
    
    
    
        	$template 		= "themes/$user_theme/templates/main_1.htm";
    
        	$inner_template1 	= "themes/$user_theme/templates/inner_signup_form.htm";
    
        	$TBS 			= new clsTinyButStrong;
    
        	$TBS->NoErr 	= true;
    
    
    
        	$TBS->LoadTemplate("$template");
    
    
    
        	$TBS->Render 	= TBS_OUTPUT;
    
        	$TBS->Show();
    
    
    
        	@mysql_close();
    
        	die();
    
    }
    
    
    
    // START => load page with form
    
    if ( !isset($form_submitted) || ($form_submitted == '') ) {
    
    
    
    $show_signup 	= 1;
    
    $template 		= "themes/$user_theme/templates/main_1.htm";
    
          $inner_template1 	= "themes/$user_theme/templates/inner_signup_form.htm";
    
          $TBS 			= new clsTinyButStrong;
    
          $TBS->NoErr 	= true;
    
    
    
          $TBS->LoadTemplate("$template");
    
          $TBS->Render 	= TBS_OUTPUT;
    
          $TBS->Show();
    
          die();
    
    }
    
    
    
    
    
    // if no errors register user and load welcome page
    
    if ($procede == true) {
    
    $random_code	= randomcode();
    
        	$password_email	= $password;
    
        	$password		= md5($password);
    
        	$passwordSalt 	= substr(md5(rand()), 0, 4);
    
    
    
        	if ( $zip_code > '' ) {
    
        		$country_list = 'USA';
    
        	}
    
    
    
        	// insert new user record
    
        	$sql = "INSERT into member_profile (email_address, user_name, password, passwordSalt, first_name, last_name, Company, Address_1, Address_2, City, State, zip_code, country, birthday, account_status, account_type, date_created, random_code)
    
        		VALUES ('$email_address', '$user_name', '$password', '$passwordSalt', '$first_name', '$last_name', '$Company', '$Address_1', '$Address_2', '$City', '$State', '$zip_code', '$country_list', '$birthday', 'new', 'standard', NOW(), '$random_code')";
    
    
    
        	@mysql_query($sql) or die($config['error_26']);//error
    
    
    
        	// get new user_id
    
        	$sql 		= "SELECT user_id, email_address, random_code FROM member_profile WHERE random_code = '$random_code' AND email_address = '$email_address'";
    
        	$query 	= @mysql_query($sql);
    
    
    
        	while ($result = @mysql_fetch_array($query)) {
    
        		$user_id 	= $result['user_id'];
    
    }
    
    
    
       	// set new user default privacy settings
    
        	$sql = "INSERT INTO privacy (videocomments, profilecomments, privatemessage, friendsinvite, newsletter, user_id, publicfavorites, publicplaylists) VALUES ('yes', 'yes', 'yes', 'yes', 'yes', '$user_id', 'yes', 'yes')";
    
    
    
        	$query = @mysql_query($sql);
    
    
    
    
    
    // Credits Mod by DD
    // Update new user with default credits
    $sql01 = "SELECT start FROM credit_config LIMIT 1";
    $query1 = @mysql_query($sql01);
    
    while ($result = @mysql_fetch_array($query1)) {
    	$startcredit = $result['start'];
    }
    
    $sql2 = "INSERT INTO credits (user_id, total_credits, pending_credits, last_purchase, total_purchases, name) VALUES ('$user_id', '$startcredit', '0', NOW(), '0', '$user_name')";
    $query2 = @mysql_query($sql2) or DIE(mysql_error());
    
    $sql02 = "INSERT INTO purchases (id, type, user_id, vid_id, date, name, uploader, uploaderID, title, amount, videoid, descr, promo) VALUES ('', 'adjustment', $user_id, 0, NOW(), '$user_name', 'none', 'none', 'none', '$startcredit', 'none', 'none', 'none')";
    $query02 = mysql_query($sql02) or die(mysql_error());
    
    // END CREDITS MOD
    
    
    
    
    
    @mysql_close();
    
    
    
          // send email
    
          $email_template	= 'email_templates/newmember.htm';
    
          $subject 		= $config['email_welcome'];
    
          $to 			= $email_address;
    
          $from 		= $config['notifications_from_email'];
    
    
    
          //send email template to TBS for rendering of variable inside
    
          $template 		= $email_template;
    
          $TBS 			= new clsTinyButStrong;
    
          $TBS->NoErr 	= true;
    
    
    
          $TBS->LoadTemplate("$template");
    
          $TBS->tbs_show(TBS_NOTHING);
    
          $message 		= $TBS->Source;
    
    
    
          //load postage.php
    
    define('access',true);
    
    include ('includes/postage.php');
    
    
    
        	// show success
    
        	$notification_type	= $config['notification_success'];
    
        	$message 			= $config['registration_success'];
    
        	$blk_notification 	= 0;
    
    
    
        	$template 			= "themes/$user_theme/templates/main_1.htm";
    
        	$inner_template1 		= "themes/$user_theme/templates/inner_notification.htm";
    
        	$TBS 				= new clsTinyButStrong;
    
        	$TBS->NoErr 		= true;
    
    
    
        	$TBS->LoadTemplate("$template");
    
        	$TBS->Render 		= TBS_OUTPUT;
    
        	$TBS->Show();
    
    
    
        	@mysql_close();
    
        	die();
    
    }
    
    
    
    ?>$TBS->Source;
    
    
    
          //load postage.php
    
    define('access',true);
    
    include ('includes/postage.php');
    
    
    
        	// show success
    
        	$notification_type	= $config['notification_success'];
    
        	$message 			= $config['registration_success'];
    
        	$blk_notification 	= 0;
    
    
    
        	$template 			= "themes/$user_theme/templates/main_1.htm";
    
        	$inner_template1 		= "themes/$user_theme/templates/inner_notification.htm";
    
        	$TBS 				= new clsTinyButStrong;
    
        	$TBS->NoErr 		= true;
    
    
    
        	$TBS->LoadTemplate("$template");
    
        	$TBS->Render 		= TBS_OUTPUT;
    
        	$TBS->Show();
    
    
    
        	@mysql_close();
    
        	die();
    
    }
    
    
    
    ?>

  11. I have been replacing my web's square boxes with round-cornered boxes using this CSS:

     

    .t {background: url(images/dot_B76E62.gif) 0 0 repeat-x; width: 53em}
    .l {background: url(images/dot_B76E62.gif) 0 0 repeat-y; height: 15em}
    .r {background: url(images/dot_B76E62.gif) 100% 0 repeat-y; height: 15em}
    .b {background: url(images/dot_B76E62.gif) 0 100% repeat-x;}
    .bl {background: url(images/box_bottom_left.gif) 0 100% no-repeat;border:none;height: 15em}
    .br {background: url(images/box_bottom_right.gif) 100% 100% no-repeat;height: 15em}
    .tl {background: url(images/box_top_left.gif) 0 0 no-repeat;height: 15em}
    .tr {background: url(images/box_top_right.gif) 100% 0 no-repeat;padding:10px;height: 15em}
    

     

    And it works fine, along with this html:

     

    <div class="t"><div class="b"><div class="l"><div class="r"><div class="b"><div class="br"><div class="tl"><div class="tr">
    </div></div></div></div></div></div></div></div>
    

     

    I tried replacing this content-list box, css (below), with the above css, but it didn't work correctly, can you assist me?

     

    /*--Content List Container--*/
    #content-list {
      width: 640px;
      display: inline-block;
      list-style-type: none;
      border: 6px solid #960000;
      margin-bottom: 5px;
      float: left;
    }
    
    #content-list li {
      list-style-type: none;
    }
    
    .content-list-narrow {
      width: 256px;
      padding: 5px 4px;
    }
    
    #content-list-narrow li {
      margin: 5px 0px;
    }
    
    #content-list a:link { color: #000000; text-decoration: none; }
    #content-list a:visited { color: #5798ca; text-decoration: none; }
    #content-list a:hover { color: #a9ceea; }
    
    .content-list-thumb {
      width: 102px;
    

  12. On a web site I'm using, the php credit script succeeds when, upon a return from paypal, purchased credits are added to the users account. However, the return location is a success page that has a "click here to return to the home page" link. If a user stays on that success page and refreshes the page, the amount of credits purchased keeps adding that amount to the users account, upon every refresh (without paying for those extras credits).

     

    Rather than find someone to modify the script, I thought one solution might be to add something so that the page never appears and somehow the "click here to return to the home page" link automatically re-directs the successful purchaser to the home page, so he doesn't have the chance to refresh the success page. Is this a sound solution? Can you suggest what might be nedded to accomplish this? Or suggest a better solution?

  13. I'm trying to figure out why, when I do a test purchase on my web site,

    that the purchase completes at Paypal, but the purchase info is not being sent back to the site.

     

    It worked successfully, but for some reason now it is not.

    Any thoughts/suggestions would be apprecaited.

     

  14. I'm using a php script for a video web site.

    After a search, a thumbnail appears with a description next to it. I've added      to move the description to the right of the thumbnail image, but it only moves the first line of text, the next line, in the description, is flush up against the thumbnail image again. I'm looking for a solution where all of the description lines have a margin a space between themselves and the thumbnail image.

     

    I believe this line of code is where the description is generated/displayed from:

    [blk1.vid_desc;htmlconv=no;block=div;ope=max:268;comm]

     

    Any suggestions? Thanks.

     

    Here's the whole file:

    <!--Begin Wide Column-->
    <div id="column-wide" style="margin: 0px auto; float: none;">
      <div id="generic-container" >
    
    <div style="margin-left:12px; float:left;">
        <!--<img src="themes/[var.user_theme]/images/icons/members_32.png" alt="members" width="32" height="32" align="absmiddle" />  <strong>Videos:
         [var.members_total;comm]</strong>-->
      </div>
      <br />
    
      <div id="members-search">
    <br/><br/>
    
    <center><div class="container8">
             <p>
           	<center><font face="verdana"><font size="2";font color=#000000;">Please find your search results below for your search word(s) "<font face="verdana"><font size="2";font color=#800000;">[var.keyword]</font>" .<br/>
    	<font face="verdana"><font size="2";font color=#800000;">To view, simply select the video thumbnail image.</font><br/>
    	<font face="verdana"><font size="2";font color=#000000;">To search again, simply select the word "search" in the navigation menu above.</center></font>
             </p>
    </div></center>
    
    <br/>
    
    <div id="content-list" style="float:none;width:590px;text-align:center">
    <br/>
    <table style="border:none">
    <tr>
       <td width="10px"><a href="videos/[blk1.vid_id;block=div]/" rel="gb_page_center[600, 440]" style="float:right"><img src="uploads/thumbs/[blk1.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></td>
       <td width="400px"><span style="color: #000000;"><!--[var.lang_title]--></span>    <a href="videos/[blk1.vid_id;block=div]/" rel="gb_page_center[600, 440] "><!--[blk1.Title;htmlconv=no;block=div;ope=max:70;comm]--></a><br /><!--[var.lang_description]:-->    [blk1.vid_desc;htmlconv=no;block=div;ope=max:268;comm]</td>
    </tr>
    </table>
    <br/>
    
    </div>
    </div>
    <!--End Wide Column-->

  15. I'm using a php video script where you can select a thumbnail image and the corresponding video plays in a pop-up box.

     

    I've added a php JukeBox script for videos, where thumbnails are displayed and the corresponding video plays on another page (instead of in a pop-up box) which works successfully.

     

    However, I'm trying to integrate the existing pop-up box code into the jukebox php page, to see if I can get the jukebox video to play in the pop-up box.

     

    The jukebox php page code is at the bottom of this posting.

     

    I'm trying to integrate the pop-up box line of code into the jukebox line of code.

     

    Pop-up box line of code:

    <a href="videos/[blk1.vid_id;block=div]/" rel="gb_page_center[600, 440] ">

     

     

    Jukebox line of code:

    <artistLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</artistLink>Can you help me?

     

    Here is the entire jukebox.php page:

    <?php include("../classes/config.php");?>
    <artworkinfo>
    <?
    $query = "select * from videos where viewtime<>'0000-00-00 00:00:00' and public_private='public' AND approved ='yes' AND promoted ='yes'  limit 10"; // Max 10!";
    $db=mysql_connect ($dbhost,$dbusername,$dbpassword) or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ($dbname);
    
    $num_rows = mysql_num_rows(mysql_query("select * from videos WHERE public_private = 'public' AND promoted = 'yes' AND approved ='yes'"));
    
    $result = mysql_query($query) or die ('Query Error: ' . mysql_error());
    while ($results = mysql_fetch_array($result)) {
    ?>
    <albuminfo>
    <artLocation>../uploads/play_thumbs/<?=$results['video_id']; ?>.jpg</artLocation>
    <font color="#000000"><artist> CLICK HERE !!</artist></font>
    
    <albumName><?=$results['title']; ?></albumName>
    <artistLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</artistLink>
    <albumLink>../play.php?vid=<?=$results['indexer']; ?>&src=jukebox</albumLink>
    </albuminfo>
    <?
    }
    mysql_close();
    ?>
    </artworkinfo>

     

  16. I'm using a php JukeBox script for videos, where a user selects "Click Here", below a displayed thumbnail image, and the corresponding video plays on another page.

     

    I'm trying to substitute videoBox script which will pop-up the thumbnail's corresponding video, and play it in the pop-up box, rather than on another page(play.php)

     

    Here is the current jukebox.php page:

     

    <?php include("../classes/config.php");?>
    <artworkinfo>
    <?
    $query = "select * from videos where viewtime<>'0000-00-00 00:00:00' and public_private='public' AND approved ='yes' AND promoted ='yes'  limit 10"; // Max 10!";
    $db=mysql_connect ($dbhost,$dbusername,$dbpassword) or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ($dbname);
    
    $num_rows = mysql_num_rows(mysql_query("select * from videos WHERE public_private = 'public' AND promoted = 'yes' AND approved ='yes'"));
    
    $result = mysql_query($query) or die ('Query Error: ' . mysql_error());
    while ($results = mysql_fetch_array($result)) {
    ?>
    <albuminfo>
    <artLocation>../uploads/play_thumbs/<?=$results['video_id']; ?>.jpg</artLocation>
    <font color="#000000"><artist> [b]CLICK HERE !!</[/b]artist></font>
    
    <albumName><?=$results['title']; ?></albumName>
    <artistLink>../[b]play.php[/b]?vid=<?=$results['indexer']; ?>&src=jukebox</artistLink>
    <albumLink>../[b]play.php[/b]?vid=<?=$results['indexer']; ?>&src=jukebox</albumLink>
    </albuminfo>
    <?
    }
    mysql_close();
    ?>
    </artworkinfo>

     

    Here are VideoBox lines of code that they instruct me to paste onto the page. I've added these lines to the Jukebox display page:

     

    <script type="text/javascript" src="js/mootools.js"></script>
    <script type="text/javascript" src="js/swfobject.js"></script>
    
    <script type="text/javascript" src="js/videobox.js"></script>And you must include the css file(for the styles).
    
    <link rel="stylesheet" href="css/videobox.css" type="text/css" media="screen" />And, here is the thing:
    
    <a href="http://www.youtube.com/watch?v=uhi5x7XCCRTE" rel="vidbox" title="caption">our video</a>

     

    Can you give me an idea/suggestion of how I can change the code to link the videobox with the jukebox so that a video will play in the videobox instead of playing at play.php? Currently, the jukebox plays videos from my database, not from youtube. This is waht I'd like videobox to do.

     

    Thanks.

     

  17. I'm using an open source php script for my web site, where the main header, footer and index page are all centered vertically in the browser, with an inch and a half of white space on the left side and right side. How do I add color to the white space on each side?

  18. I'm using an existing php script. In this script you need to add code to page.php in order to add a web page. But when you add a page, the browser shoes something like this, for example:

    http://www.webexample.com/page.php?page=12

     

    I'd like to add a page that looks something like this instead:

    http://www.webexample.com/newpage

     

    Can you help me? Here is the existing code of page.php:

     

    <?php
    include_once ("classes/config.php");
    include_once ('classes/menu.php');
    include_once ('classes/sessions.php');
    
    $page = $_GET['page'];
    
    //use this script to load various generic pages  (e.g. about us, terms etc)
    
    switch ($page){
    
    case 1:
    $which_page = 'generic_aboutus.htm';
    break;
    
    case 2:
        $which_page = 'generic_contactus.htm';
        break;
        
        case 3:
        $which_page = 'generic_terms.htm';
        break;
        
        default:
        header( 'Location: index.php' ) ;
        break;
        }
        
    //START-----------------------
    $template = "templates/main.htm";
    $inner_template1 = "templates/$which_page";//middle of page
    $TBS = new clsTinyButStrong;
    $TBS->NoErr = true;// no more error message displayed.
    $TBS->LoadTemplate("$template");
    $TBS->MergeBlock('mp', $recent);
    $TBS->MergeBlock('blkfeatured', $result_featured);
    $TBS->Render = TBS_OUTPUT;
    $TBS->Show();
    @mysql_close();
    die();
    ?>

×
×
  • 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.