Chrisj
-
Posts
551 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Chrisj
-
-
Thanks for your reply.
I tried to quickly shorten the list of file formats, when copying it here, just so there would be less to read in this posting.
So, that last quote issue, isn't in the actual code.
And I was aware of the header in two places.
Which I've corrected. Not sure about your MySQL comment. Would that affect the browser issue?
Here's the revised code with no "last quote" and only one "header".
Any additional help will be greatly appreciated.
<?php session_start(); require_once 'phps3integration_lib.php'; $message = ""; if (@$_POST['submit'] != "") { $allowed_ext = array("gif", "jpeg", "jpg", "png", "pdf", "doc", "docs", "zip" , "mov", "flv", "mp4", "3gp"); $extension = end(explode(".", $_FILES["fileBrowser"]["name"])); if (($_FILES["fileBrowser"]["size"] < 10485760) && in_array($extension, $allowed_ext)) { if ($_FILES["fileBrowser"]["error"] > 0) { //$message.="There is some error in upload, see: " . $_FILES["fileBrowser"]["error"] . "<br>";//Enable this to see actual error $message.="There is some error in upload. Please try after some time."; } else { $uploaded_file = uploaded_file_to_s3($_FILES["fileBrowser"], "uploads", true); if ($uploaded_file != FALSE) { $user_name = @$_POST['user_name'] != "" ? @$_POST['user_name'] : "Anonymous"; $form_data = array( 'file' => $uploaded_file, 'user_name' => $user_name, 'type' => 'file' ); mysql_query("INSERT INTO `phps3files` (`id`, `file`, `user_name`, `type`) VALUES (NULL, '" . $uploaded_file . "', '" . $user_name . "', 'file')") or die(mysql_error()); $message.= "File Successfully Uploaded."; } else { $message.="There is some error in upload. Please try after some time."; } } } else { $message.= "Upload Unsuccessful. Please Contact Administrator"; } } ?> <html> <head><br /><br /><br /> <font size="6" color="#c53800"><b>Upload:</b></font><br /><br /> </head> <style> button { background: #bi4e4e; color: red; } </style> <body> <?php require_once 'header.php'; ?> <!--<fieldset>--> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <div class="control-group"> <label for="file" class="control-label"><font size="6" color="#454545"><b>Choose a file to upload:</b></font></label> <button type="button" onclick="getFilePathFromDialog();">ChooseFile</button> <input type="text" id="filePath" name="filePath"/><br /> <input type="file" id="fileBrowser" name="fileBrowser"style="visibility:hidden; display:none;" /> <?php //echo form_error('file'); ?> </div> <script> function getFilePathFromDialog() { document.getElementById('fileBrowser').click(); document.getElementById('filePath').value = document.getElementById('fileBrowser').value; } </script> </html> <div class="control-group"> <label></label> <div class='controls'> <input type="image" src="/images/upload.png" name="submit" value="Upload"> </div> </div> </form> <?php if ($message != "" || @$_SESSION['message'] != "") { ?> <div class="alert alert-success"> <?php echo $message; ?> <?php echo @$_SESSION['message']; @$_SESSION['message'] = ''; ?> </div> <?php } ?> <div> </div> <?php require_once 'footer.php'; ?>
-
The upload script I'm using performs successfully in Google, but not in IE or FF.In Google, it doesn't fill the box with the path(see image), but it shows a message of successful upload.In IE, it fills the box with the path, but the path begins with C:\fakepath\... and doesn't upload or show unsuccessful upload message. In FF, my computer shows something's uploading, but it doesn't appear in AmazonS3 nor does it fill the box, or show any message.I'm not interested in starting over with a different script, I'd just like to get some suggestions/ideas/remedy for this one, please. Thanks for any help
<?php session_start(); require_once 'phps3integration_lib.php'; $message = ""; if (@$_POST['submit'] != "") { $allowed_ext = array("gif", "jpeg", "jpg", "png", "pdf", "doc", "docs", "zip" , "mov", "flv", "mp4", "3gp", "); $extension = end(explode(".", $_FILES["fileBrowser"]["name"])); if (($_FILES["fileBrowser"]["size"] < 10485760) && in_array($extension, $allowed_ext)) { if ($_FILES["fileBrowser"]["error"] > 0) { //$message.="There is some error in upload, see: " . $_FILES["fileBrowser"]["error"] . "<br>";//Enable this to see actual error $message.="There is some error in upload. Please try after some time."; } else { $uploaded_file = uploaded_file_to_s3($_FILES["fileBrowser"], "uploads", true); if ($uploaded_file != FALSE) { $user_name = @$_POST['user_name'] != "" ? @$_POST['user_name'] : "Anonymous"; $form_data = array( 'file' => $uploaded_file, 'user_name' => $user_name, 'type' => 'file' ); mysql_query("INSERT INTO `phps3files` (`id`, `file`, `user_name`, `type`) VALUES (NULL, '" . $uploaded_file . "', '" . $user_name . "', 'file')") or die(mysql_error()); $message.= "File Successfully Uploaded."; } else { $message.="There is some error in upload. Please try after some time."; } } } else { $message.= "Upload Unsuccessful. Please Contact Administrator"; } } ?> <?php require_once 'header.php'; ?> <html> <head><br /><br /><br /> <font size="6" color="#c53800"><b>Upload:</b></font><br /><br /> </head> <style> button { background: #bi4e4e; color: red; } </style> <body> <?php require_once 'header.php'; ?> <!--<fieldset>--> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <div class="control-group"> <label for="file" class="control-label"><font size="6" color="#454545"><b>Choose a file to upload:</b></font></label> <button type="button" onclick="getFilePathFromDialog();">ChooseFile</button> <input type="text" id="filePath" name="filePath"/><br /> <input type="file" id="fileBrowser" name="fileBrowser"style="visibility:hidden; display:none;" /> <?php //echo form_error('file'); ?> </div> <script> function getFilePathFromDialog() { document.getElementById('fileBrowser').click(); document.getElementById('filePath').value = document.getElementById('fileBrowser').value; } </script> </html> <div class="control-group"> <label></label> <div class='controls'> <input type="image" src="/images/upload.png" name="submit" value="Upload"> </div> </div> </form> <?php if ($message != "" || @$_SESSION['message'] != "") { ?> <div class="alert alert-success"> <?php echo $message; ?> <?php echo @$_SESSION['message']; @$_SESSION['message'] = ''; ?> </div> <?php } ?> <div> </div> <?php require_once 'footer.php'; ?>
-
Thank you for your reply.
Do I have to name your code something in CSS?
-
I'm using an Upload Form and I believe this line of code, shown below, is what the attached image shows (see attached image).
How can I add a different image button to replace the "Choose File" button that's currently there?
Also, how can I put some space between the Choose File button and the "No File Chosen" function?
Thanks
<div class='controls'> <input id="file" type="file" name="file" /> <?php //echo form_error('file'); ?></div>
-
I'm trying to separate the HTML(form) into a separate .html file (from the php file below).
Someone suggested to "place the HTML in someFile.html and the PHP in someFile.php, and alter the <form> tag's 'action' element in the .html file to target someFile.php".
But I don't know how to alter the <form> tag's 'action' element in the .html file to target this upload_file.php file.
Any additional help will be appreciated.<?php session_start(); require_once 'phps3integration_lib.php'; $message = ""; if (@$_POST['submit'] != "") { $allowed_ext = array("gif", "jpeg", "jpg", "png", "pdf", "doc", "docs", "zip", "flv", "mp4"); $extension = end(explode(".", $_FILES["file"]["name"])); if (($_FILES["file"]["size"] < 32428800) && in_array($extension, $allowed_ext)) { if ($_FILES["file"]["error"] > 0) { //$message.="There is some error in upload, see: " . $_FILES["file"]["error"] . "<br>";//Enable this to see actual error $message.="There is some error in upload. Please try after some time."; } else { $uploaded_file = uploaded_file_to_s3($_FILES["file"], "uploads", true); if ($uploaded_file != FALSE) { $user_name = @$_POST['user_name'] != "" ? @$_POST['user_name'] : "Anonymous"; $form_data = array( 'file' => $uploaded_file, 'user_name' => $user_name, 'type' => 'file' ); mysql_query("INSERT INTO `phps3files` (`id`, `file`, `user_name`, `type`) VALUES (NULL, '" . $uploaded_file . "', '" . $user_name . "', 'file')") or die(mysql_error()); $message.= "File successfully uploaded in S3 Bucket."; } else { $message.="There is some error in upload. Please try after some time."; } } } else { $message.= "Invalid file, Please upload a gif/jpeg/jpg/png/pdf/doc/docs/zip file of maximum size 30 MB."; } } ?> <?php require_once 'header.php'; ?> <fieldset> <legend>PHP AWS S3 integration library Demo1</legend> Description: In this demo a file is being upload to an S3 bucket using "PHP AWS S3 integration library". After upload you can check the uploaded file in below table. If you require some manipulation before uploading file to S3 then check <a href="upload_file_manually.php">Demo2</a> <br /> <br /> <form action="" method="post" enctype="multipart/form-data"> <div class="control-group"> <label for="file" class="control-label">Choose a file to upload: <span style="color:red">*</span></label> <div class='controls'> <input id="file" type="file" name="file" /> <?php //echo form_error('file'); ?> </div> </div> <div class="control-group"> <label for="user_name" class="control-label">Your name:</label> <div class='controls'> <input id="user_name" type="text" name="user_name" maxlength="255" value="" /> <?php //echo form_error('user_name'); ?> </div> </div> <div class="control-group"> <label></label> <div class='controls'> <input type="submit" name="submit" value="Submit" class="btn"> </div> </div> </form> </fieldset> <?php if ($message != "" || @$_SESSION['message'] != "") { ?> <div class="alert alert-success"> <?php echo $message; ?> <?php echo @$_SESSION['message']; @$_SESSION['message'] = ''; ?> </div> <?php } ?> <div> <table class="table table-hover"> <caption> <strong>Last 10 user uploaded files</strong> </caption> <?php $files_result = mysql_query("SELECT * from `phps3files` WHERE type LIKE 'file' ORDER by id DESC LIMIT 10"); $i = 1; while ($file = mysql_fetch_object($files_result)) { ?> <tr> <td><?php echo $i++; ?></td> <td><a href="<?php echo site_url_s3("uploads/" . $file->file); ?>" target="_blank">View/Download</a> </td> <td><a href="<?php echo site_url("delete_file.php?id=" . $file->id); ?>">Delete file from S3</a></td> <td><?php echo "Uploaded by: " . $file->user_name; ?></td> </tr> <?php } if ($i == 1) { ?> <tr> <td colspan="2"> No files uploaded yet</td> </tr> <?php } ?> </table> </div> <h4>Source Code Part of Demo</h4> <pre class="prettyprint lang-php linenums"> <?php session_start(); require_once 'phps3integration_lib.php'; $message = ""; if (@$_POST['submit'] != "") { $allowed_ext = array("gif", "jpeg", "jpg", "png", "pdf", "doc", "docs", "zip"); $extension = end(explode(".", $_FILES["file"]["name"])); if (($_FILES["file"]["size"] < 32428800) && in_array($extension, $allowed_ext)) { if ($_FILES["file"]["error"] > 0) { //$message.="There is some error in upload, see: " . $_FILES["file"]["error"] . "<br>";//Enable this to see actual error $message.="There is some error in upload. Please try after some time."; } else { $uploaded_file = uploaded_file_to_s3($_FILES["file"], "uploads", true); if ($uploaded_file != FALSE) { $user_name = @$_POST['user_name'] != "" ? @$_POST['user_name'] : "Anonymous"; $form_data = array( 'file' => $uploaded_file, 'user_name' => $user_name, 'type' => 'file' ); mysql_query("INSERT INTO `phps3files` (`id`, `file`, `user_name`, `type`) VALUES (NULL, '" . $uploaded_file . "', '" . $user_name . "', 'file')") or die(mysql_error()); $message.= "File successfully uploaded in S3 Bucket."; } else { $message.="There is some error in upload. Please try after some time."; } } } else { $message.= "Invalid file, Please upload a gif/jpeg/jpg/png/pdf/doc/docs/zip file of maximum size 30 MB."; } } ?> </pre> <?php require_once 'footer.php'; ?>
-
What file size is allowed with this code?
if (@$_POST['submit'] != "") { $allowed_ext = array("gif", "jpeg", "jpg", "png", "pdf", "doc", "docs", "zip", "flv", "mp4"); $extension = end(explode(".", $_FILES["file"]["name"])); if (($_FILES["file"]["size"] < 524288000) && in_array($extension, $allowed_ext)) {
-
Thanks for your reply. I see what you mean, that makes sense, thanks, but I don't know how to "on page load, use JavaScript to disable it", because i'm not a coder. I was provided this code. Can you please help add 'on page load, use JavaScript to disable it' ?
-
Thanks for your replies.
I also have this code:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script> $(function() { $('input.required').click(function() { var unchecked = $('input.required:not(:checked)').length; if (unchecked == 0) { $('#submitBtn').removeAttr('disabled'); } else { $('#submitBtn').attr('disabled', 'disabled'); } }); }); </script>
Does that make it more like "how it should be done"? I look forward to your reply.
-
Can you help me integrate this code :
<form method="post" action="submit.php"> <input type="checkbox" class="required" /> Click to check <br /> <input disabled="disabled" type='submit' id="submitBtn" value="Submit"> </form>
In to this Contact Form code, please?
<form action="../page.php?page=1" method="post" name="contact_us" onSubmit="return capCheck(this);"> <table cellpadding="5" width="100%"> <tr> <td width="10" class="required_field">*</td> <td width="80">Your Name</td> <td><input type="text" name="name" maxlength="40" style="width:400px;/></td> </tr> <tr> <td class="required_field">*</td> <td>Email Address</td> <td><input type="text" name="email" maxlength="40" style="width:400px;/></td> </tr> <tr> <td></td> <td>Comments:</td> <td><textarea name="comments" style="width: 400px; height: 250px;"></textarea></td> </tr> </table> </form
-
This contact form works fairly well, but I do get spam.
Can you add something to this existing form that will make it a little better at not letting spam thru?
<form action="../page.php?page=1" method="post" name="contact_us" onSubmit="return capCheck(this);"> <table cellpadding="5" width="100%"> <tr> <td width="10" class="required_field">*</td> <td width="80">Name</td> <td><input type="text" name="name" maxlength="50" style="width:400px; border: 1px solid #696969;" /><br /><br /></td> </tr> <tr> <td class="required_field">*</td> <td>Email Address</td> <td><input type="text" name="email" maxlength="40" style="width:400px; border: 1px solid #696969;" /><br /><br /></td> </tr> <tr> <td></td> <td>Subject:</td> <td><input type="text" name="subject" maxlength="40" style="width:400px; border: 1px solid #696969;"/><br /><br /></td> </tr> <tr> <td class="required_field">*</td> <td>Enter Image Code:</td> <td><input type="text" value="" name="captext" style="width: 100px" maxlength="6" /></td> </tr> <tr> <td></td> <td><a onclick="refresh_security_image(); return false;" style="cursor:pointer;"><u>Refresh Image</u></a></td> <td><img src="../includes/captcha.php" border="0" id="verificiation_image" /></a></td> </tr> </table> <br/> <p> <input type="hidden" name="submited" value="1" /> <input type="submit" name="submit" value="Submit" style="margin:7px 10px 0px 0px; padding:10px 0px 10px 0px; font-size:15px; font-style:Century-Gothic;" /> </p> </form> </td> </tr> </table> </div> <script type="text/javascript"> <!-- function refresh_security_image() { var new_url = new String("../includes/captcha.php?width=132&height=36&charcators="); new_url = new_url.substr(0, new_url.indexOf("width=") + 37); // we need a random new url so this refreshes var chr_str = "123456789"; for(var i=0; i < 6; i++) new_url = new_url + chr_str.substr(Math.floor(Math.random() * 2), 1); document.getElementById("verificiation_image").src = new_url; } --> </script> <!-- captch start --> <script type="text/javascript" id="clientEventHandlersJS" language="javascript"> </script> <!-- captch end -->
Thanks
-
I'm using the PHPmotion script, with a use-a-credit to view-a-video mod. When the user logs out, the viewed video should not be available again to view, until he logs back in and chooses it chooses it, via a credit, but it is still available when he logs back in. Any ideas on what file may be responsible for what I guess you could call 'clearing the session'?Any guidance will move me towards a remedy, thanks
-
I'm looking for help with the some log-out issues with the PHPmotion script
-
I'm using the PHPmotion script.
I've changed the URL in SiteAdmin from http://www.url.com to simply www.url.com, so that it will work with an SSL.
And then proceeded to change the base url code, in the main page, by simply changing [var.base.url]/themes/main.css to
../themes/main.css etc. so that the site appears the same. Simple path changes like that.
The file that I'm stumped with is the inner_member_profile.htm which is for the My Account part of the script.
In this user account, thumbnail images of the users' uploaded videos appear there in their Profile.
Below the row of thumbnails are page number links 1 2 3 4 Next >>
Before the change, I could page to the next page of thumbnails, but not after the change.So, now when I right click any of the (page) numbers I see this: javascript:void(0)
I'm sure it's not a big code issue, but I'm not as familiar with html, or php, as you may be.
The code that I can see that presents these numbers there is:
<!-- Media Pagination start --> <div class="MP_pagination"> <!--[onload_802;block=div;when [var.load_media]=1;comm]--> <ul> <li><font color="#000000">[var.show_pages_vids;htmlconv=no]</font></li> </ul> </div> <!-- Media Pagination end -->
Any ideas?
Any help will be appreciated.
-
Thanks, but with all due respect, I could research this on line via google, but I am hoping to get some specific code help here, on this forum, regarding changing the color of the placeholder text only for this specific line code.
Thanks again for any specific help.
-
Thanks for that reply and link. Much appreciated.
Can you please tell me how I can change the font color of the text that replaces: "default value" ?
Thanks again
-
Thank you for your reply.
Well, I'm looking for another solution then, if the placeholder doesn't work on all browsers.
Any additional help will be appreciated.
-
Thanks for your reply, however I tried this and it didn't affect the Form at all:
<input type="text" name="keyword" id="sbi1" size="20" placeholder="Enter keywords" value="" onfocus="if(this.value==this.defaultValue) this.value='';">
Any additional help will be appreciated
-
I have this Form code that works successfully to Search a web site (below).
How can I add text in the field/box that will disappear when the field/box is selected to add search keywords to?
Also, how can I widen the field/box?
Any help/examples/suggestions will be appreciated.
<form method="get" action="search.php"> <div id="siteSearch"> Enter Search Words <img src="themes/default/images/arrow-red.png"> <input type="hidden" name="type" value="videos"/> <input type="text" name="keyword" id="sbi1" value="" onfocus="if(this.value==this.defaultValue) this.value='';"> <input type="image" align="middle" src="images/search.png" name="sa" value="Search" id="mySearch"/><br/> </div> </form>
Thanks
-
I'm trying to change the phpmotion script so that upon logging in, a user goes directly to the upload page.
I've accomplished that, but after browse > select > upload there nothing happens.
I suspect that the previous page (that I've skipped over) needs to be completed first, it's the video_upload_form.htm.
Is there a way I can mod the form so it's always completed? Or so it's not required?
Here's what appears on the upload page (the form part of the upload page video_upload.htm), which may help you help me:
<!-- Start Upload Form --> <form name="form_upload" method="post" enctype="multipart/form-data" action="[var.path_to_upload_script]" style="margin: 0px; padding: 0px;"> <noscript><input type="hidden" name="no_script" value="1" /></noscript> <input type="hidden" name="title" value="[var.title]" /> <input type="hidden" name="description" value="[var.description]" /> <input type="hidden" name="tags" value="[var.tags]" /> <input type="hidden" name="location_recorded" value="[var.location_recorded]" /> <input type="hidden" name="allow_comments" value="[var.allow_comments]" /> <input type="hidden" name="allow_embedding" value="[var.allow_embedding]" /> <input type="hidden" name="public_private" value="[var.public_private]" /> <input type="hidden" name="channel" value="[var.channel]" /> <input type="hidden" name="channel_name" value="[var.channel_name]" /> <input type="hidden" name="sub_cat" value="[var.sub_cat]" /> <input type="hidden" name="form_submitted" value="yes" /> <div id="upload_slots"><span class="font5_16"><b><br/><font size="3" color="#800000" face="Arial">[var.lang_please_upload] </b></font></span><br/><br/><input type="file" name="upfile_0" size="72" value="" /></div> <noscript><br/><input type="reset" name="no_script_reset" value="Reset" /> <input type="submit" name="no_script_submit" value="Upload" /></noscript> </form> <!-- End Upload Form -->
I'd be glad to provide the upload_video_form.htm code also. Any help/suggestion-to-try will be appreciated
-
Thanks for all the help.
Please tell me how to " call the exit function after calling a location header() function! "
-
I'd like to change this code so that upon logging-in the user is redirected to upload.php.
Can you help as to where in this code to make that change, please?
<?php error_reporting (E_ALL); include_once ('classes/config.php'); include_once ('classes/sessions.php'); if ( $enable_forum == 1 ) header("Location: " . $smf_bridge_register); $referer = $_SERVER[HTTP_REFERER]; if ( !ereg ($base_url, $referer) ) $referer = $base_url; $type = mysql_real_escape_string( $_GET['type'] ); if ( $_POST['submitted'] != 'yes' ) { $show_signup = 0; $show_login = 1; if ( !isset($form_submitted) || ($form_submitted == '') ) { if ( defined('SMF_INSTALLED') ) $show_login = 2; $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(); } } if ( $_POST['submitted'] == 'yes' && !isset($_POST['user_name_login']) || ($_POST['user_name_login'] == '') || !isset($_POST['password_login']) || ($_POST['password_login'] == '')) { //display form with error message $error_message = $config['incorrect_logins']; $message_type = $lang_error; $blk_notification = 1; $show_signup = 0; $show_login = 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(); } // GET LOGIN INFORMATION AND CHECK AGAINST DATABASE $user_name_login = mysql_real_escape_string($_POST['user_name_login']); $password_login = mysql_real_escape_string($_POST['password_login']); $password_login = md5($password_login); $remember_me = mysql_real_escape_string($_POST['remember_me']); $cookie_time = mysql_real_escape_string($_POST['cookie_time']); $referer_url = mysql_real_escape_string($_POST['referer_url']); $config_redirect = 'yes'; if ($cookie_time == '-1' ) $cookie_time = 43200; // case insensitive login and registration $user_name_login = strtolower($user_name_login); $sql = "SELECT user_name, password FROM member_profile WHERE user_name = '$user_name_login' AND password = '$password_login'"; $query = @mysql_query($sql); $result = @mysql_fetch_array($query); $result_display_username = $result['user_name']; $result_username = strtolower($result['user_name']); if ( $result_username == $user_name_login ) { //success login - checkinng if user has confirmed email $sql = "SELECT user_name, user_id, password, passwordSalt, account_status FROM member_profile WHERE user_name = '$user_name_login' AND password = '$password_login'"; $query = @mysql_query($sql); $outcome = @mysql_fetch_array($query); $result = $outcome['account_status']; if ( $result == 'new' ) { //email not confirmed $notification_type = $config['notification_error']; $message = $config['email_not_confirmed']; $blk_notification = 1; $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(); } elseif( $result == 'suspended' ) { //account suspended $notification_type = $config['notification_error']; $error_message = $config['account_suspended']; $blk_notification = 1; $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(); } elseif( $result == 'active' ) { @session_start(); @session_register('user_id'); @session_register('user_name'); @session_register('user_group'); $_SESSION['user_id'] = $outcome['user_id']; $_SESSION['user_name'] = $result_display_username; $_SESSION['user_group'] = $outcome['user_group']; $password = $outcome['password']; $passwordSalt = $outcome['passwordSalt']; $loggedin = 1; // remember me if ( $remember_me == 'remember_me' ) { $how_long = (60 * $cookie_time); $cookie_pass = sha1( sha1($password) . sha1($passwordSalt) ); setcookie('user', $result_display_username, time()+$how_long); setcookie('pass', $cookie_pass, time()+$how_long); } header("Location: index.php"); /* if ( $referer_url == '' ) $referer_url = "index.php"; if ($config_redirect == 'yes') { header("Location: $referer_url"); //redirect to last page } else { header("Location: " . "index.php"); //redirect to Myaccount page } */ } } else { //display form with error message $error_message = $config['incorrect_logins']; $message_type = $lang_error; $blk_notification = 1; $show_login = 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(); } ?>
Thanks
-
Is there any way to block a web visitor from seeing the code of my php web site, when they right-click > View Source?
Or at least blocking them from copying the code that they see when they right-click > View Source?
-
I'm looking for a fairly simple upload script for a web page to upload video files, just one at a time, to a private folder, so that I could download them later, with maybe a progress bar. A free one would be prefered.
Thanks -
This code;
gb_page_center
creates a pop-up to show another page, as hsow in the attched image. As you can see by the horizontal scrolling blue bar (at the bottom of the pop-up (greybox)), and the vertical scrolling blue bar (on the right side of the pop-up box), the video player can be centered by using those scroll bars manually. However, I'd like just the video player to be in the center of the pop-up box, without the blue scroll bars being there at all, when the box pops-up.
Presently the line of code is:<a href="videos/[blk1.vid_id;block=div]/" rel="gb_page_center[470,370]" style="float:right"><br />
How can I put the player in the box, and without the scroll bars?
Any suggestions/help/remedy will be appreciated.
Styled input file button no longer shows chosen file
in CSS Help
Posted · Edited by Chrisj
Any suggestions/ideas/remedy on how to get the chosen file to show (or something to show an action has taken place) will be appreciated