Jump to content

Chrisj

Members
  • Posts

    551
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Chrisj

  1. I'm using a php web script, and the font and text look fine, but when I log in the text font is bigger than before I log-in. Can you help me with that?
  2. I'm using a php video-sharing site script. Currently when you select a thumbnail, to view a video, a page pops-up in a pop-up box showing a message. Someone added code, to change it so that just a pop-up message box appears (rather than the page-pop-up), called Custom Message Block, but the page still appears, instead of the Custom Message Block. Can you help me figure out how I can make this so the Custom Message Block appears, rather than the (inner_purchase) page? Thanks. Any help or suggestions will be appreciated. <!--Begin Left Column--> <div id="column-left-2"> <br /> <!--Begin Whats Showing Menu--> <div class="header-narrow"><h3>[var.get_type]</h3></div> <div class="whats-showing"> </div> <div class="container-narrow-bottom"></div><!--End Whats Showing Menu--> <br /> </div><!--End Left Column--> <!--Begin Right Column--> <div id="column-right-2"> <!--Begin Video Search List--> <div style="height: 2px;"> </div> <span style="margin-bottom: 12px;" class="font5_15"> "[var.keyword]" [var.get_type_word] [var.lang_search] [var.results_show] - [var.results_of] of [var.total_records] [var.lang_results] <br /> <form id="buyVideo" name="buyVideo" method="post" action="buy-video.php"> <!--input type="submit" name="purchase" value="Continue" style="margin:7px 0" rel="gb_page_center[600, 435] "--> <input type="submit" name="purchase" value="Use Credits Now" style="margin:7px 0" rel="gb_page_center[600, 435] "> <input type="button" name="search" value="Search Again" onclick="window.location.href='page.php?page=9';" style="margin:7px 0"> <input type="button" name="search" value="Purchase Credits" onclick="window.location.href='credits.php';" style="margin:7px 0"> <input type="hidden" name="keyword" value="[var.keywords2]"> <input type="hidden" name="submitted" value="yes"> <input type="hidden" name="ttl" value="[var.total_price]"> <input type="hidden" name="user_id" value="[var.user_id]"> <input type="hidden" name="credits" value="[var.member_credits]"> <input type="hidden" name="id[]" value="[blkfeatured2.indexer;block=input]"></input> </span> <br><!-- Check All Box by DizzyD --> <input type="checkbox" name="checkall" onclick='checkedAll()'> Select All<br> <!-- end checkbox mod --> <!-- ******************************** START OF CUSTOM MESSAGE BLOCK ******************************* -JG --> <script> function doCreditCheck() { // The custom message block only appears when the PAY/SEARCH buttons are present. // The presence of those buttons indicates that you need to pay before viewing the video. document.getElementById('popupBuyMsg').style.display = 'block'; // We return false so that the href associated with this object is ignored. return false; } </script> <style> .buymsg { display:none; position:absolute; top:300px; left:300px; width:350px; background-color:#eeeeff; border-style:solid; border-width:1px; padding:15px 20px 5px 20px; } .buymsgclose { text-decoration:none; font-size:0.9em; font-variant:small-caps; margin-top:10px; } </style> <!-- Hidden message block to replace inner_purchase.htm when only a GreyBox message is being displayed. --> <div id="popupBuyMsg" class="buymsg"> You must use "credits" to view this video.<br> You have <strong>[var.member_credits]</strong> credits in your account.<br> <br /> To view this video select "Use Credits Now".<br> To purchase credits select "Purchase Credits".<br> Or Search Again. <div style="width:100%; text-align:right;"> <a class="buymsgclose" href="#" onclick="document.getElementById('popupBuyMsg').style.display = 'none'; return false;">Close Window</a> </div> </div> <!-- ********************************** END OF CUSTOM MESSAGE BLOCK ********************************** --> <div id="content-list"> <ul class="content-list-thumb" style="margin-top: 13px;"> <span style="margin-left: 1px;"><input type="checkbox" name="checkedBoxs[]" value="[blkfeatured.indexer;block=div]"></span><br /> <br /> <!-- Add an onclick feature that first checks to see if you need to use purchase credits. -JG --> <li><a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]" rel="gb_page_center[600, 435]"><img src="uploads/thumbs/[blkfeatured.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li> <!--li><a onclick="return doCreditCheck();" href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]"><img src="uploads/thumbs/[blkfeatured.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li--> </ul> <ul class="content-list-info"> <li><h4><span style="color: #800000;">[var.lang_title]:</span> <a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]" rel="gb_page_center[600, 435] "><!--[blkfeatured.title;htmlconv=no;block=div;ope=max:70;comm]--></a></h4></li> <!--<li><b>[var.lang_description]: </b><!--[blkfeatured.description;htmlconv=no;block=div;ope=max:68;comm]--></li>--> </li> <li><!--<span class="font4_12">[var.lang_tags]: </span>--></li> <li><!--<b>[var.lang_comments] - [var.lang_responses]: </b>--><!--(<!--[blkfeatured.comments;block=div;ope=max:80;comm]-->)--></li> </ul> [onload;block=div;when [var.type_videos]=1;] </div> <!--End Video Search--> <!-- Pagination start --> <div align="center"> <div id="pagination"> <li> </li> <ul>[var.show_pages;htmlconv=no]</ul> </div> </div> <!-- Pagination end --> </div><!--End Right Column--> </form>
  3. Thanks for your advice. How can I edit my posting?
  4. I'm using a php video-sharing site script where you would make a purchase to view a video. The code below is from the html search results page, where a list of thumbnails appears when you search certain keywords. Currently when you select the thumbnail, to view the video, prior to paying, a page pops-up in a pop-up box(inner_purchase.htm page) showing a message. I asked someone (JG) to help me change it to just a pop-up message box to appear, rather than a page popping-up, and he added code below called Custom Message Block, but the inner_purchase page still appears, instead of the Custom Message Block. Can you help me figure out how I can make this so the Custom Message Block appears, rather than the inner_purchase page? Thanks. Any help or suggestions will be appreciated <!--Begin Left Column--> <div id="column-left-2"> <br /> <!--Begin Whats Showing Menu--> <div class="header-narrow"><h3>[var.get_type]</h3></div> <div class="whats-showing"> <ul> <li><!--<a href="[var.url_link]/load/featured">[var.lang_featured]</a>--></li> <li><!--<a href="[var.url_link]/load/viewed">[var.lang_most_viewed]</a>--></li> <li><!--<a href="[var.url_link]/load/recent">[var.lang_most_recent]</a>--></li> <li><!--<a href="[var.url_link]/load/comments">[var.lang_most_comments]</a>--></li> </ul> </div> <div class="container-narrow-bottom"></div><!--End Whats Showing Menu--> <br /> <!--Begin Popular Tag Cloud populate from search type ??--> <!--<div class="header-narrow"><h3>[var.lang_Tags_most_popular]</h3></div>--> <!--<div class="whats-showing"><!--[var.tag_cloud_block;htmlconv=no;comm]--></div>--> <!--<div class="container-narrow-bottom"></div>--><!--End Popular Tag Cloud--> <!--Begin Left Advert--> <!--<div class="container-narrow-top"></div>--> <!--<div id="advert-left"><!--[var.ads_left;htmlconv=no;comm]--></div>--> <!--<div class="container-narrow-bottom"></div>--><!--End Left Advert--> <!--<div style="height:120px;"> </div>--> </div><!--End Left Column--> <!--Begin Right Column--> <div id="column-right-2"> <!--Begin Video Search List--> <div style="height: 2px;"> </div> <span style="margin-bottom: 12px;" class="font5_15"> "[var.keyword]" [var.get_type_word] [var.lang_search] [var.results_show] - [var.results_of] of [var.total_records] [var.lang_results] <br /> <!-- Replace ambiguous text with clear button links below. -JG --> <!-- Please Select the Continue Button to Purchase Now - Or Search Again.<br />--> <form id="buyVideo" name="buyVideo" method="post" action="buy-video.php"> <!-- CONTINUE button replaced. -JG --> <!--input type="submit" name="purchase" value="Continue" style="margin:7px 0" rel="gb_page_center[600, 435] "--> <input type="submit" name="purchase" value="Use Credits Now" style="margin:7px 0" rel="gb_page_center[600, 435] "> <input type="button" name="search" value="Search Again" onclick="window.location.href='page.php?page=9';" style="margin:7px 0"> <input type="button" name="search" value="Purchase Credits" onclick="window.location.href='credits.php';" style="margin:7px 0"> <input type="hidden" name="keyword" value="[var.keywords2]"> <input type="hidden" name="submitted" value="yes"> <input type="hidden" name="ttl" value="[var.total_price]"> <input type="hidden" name="user_id" value="[var.user_id]"> <input type="hidden" name="credits" value="[var.member_credits]"> <input type="hidden" name="id[]" value="[blkfeatured2.indexer;block=input]"></input> </span> <br><!-- Check All Box --> <input type="checkbox" name="checkall" onclick='checkedAll()'> Select All<br> <!-- end checkbox mod --> <!-- ******************************** START OF CUSTOM MESSAGE BLOCK ******************************* -JG --> <script> function doCreditCheck() { // The custom message block only appears when the PAY/SEARCH buttons are present. // The presence of those buttons indicates that you need to pay before viewing the video. document.getElementById('popupBuyMsg').style.display = 'block'; // We return false so that the href associated with this object is ignored. return false; } </script> <style> .buymsg { display:none; position:absolute; top:300px; left:300px; width:350px; background-color:#eeeeff; border-style:solid; border-width:1px; padding:15px 20px 5px 20px; } .buymsgclose { text-decoration:none; font-size:0.9em; font-variant:small-caps; margin-top:10px; } </style> <!-- Hidden message block to replace inner_purchase.htm when only a GreyBox message is being displayed. --> <div id="popupBuyMsg" class="buymsg"> You must use "credits" to view this video.<br> You have <strong>[var.member_credits]</strong> credits in your account.<br> <br /> To view this video select "Use Credits".<br> To purchase credits select "Purchase Credits".<br> Or Search Again. <div style="width:100%; text-align:right;"> <a class="buymsgclose" href="#" onclick="document.getElementById('popupBuyMsg').style.display = 'none'; return false;">Close Window</a> </div> </div> <!-- ********************************** END OF CUSTOM MESSAGE BLOCK ********************************** --> <div id="content-list"> <ul class="content-list-thumb" style="margin-top: 13px;"> <span style="margin-left: 1px;"><input type="checkbox" name="checkedBoxs[]" value="[blkfeatured.indexer;block=div]"></span><br /> <br /> <!-- Add an onclick feature that first checks to see if you need to use purchase credits. -JG --> <li><a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]" rel="gb_page_center[600, 435]"><img src="uploads/thumbs/[blkfeatured.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li> <!--li><a onclick="return doCreditCheck();" href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]"><img src="uploads/thumbs/[blkfeatured.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li--> </ul> <ul class="content-list-info"> <li><h4><span style="color: #000000;">[var.lang_title]:</span> <a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]" rel="gb_page_center[600, 435] "><!--[blkfeatured.title;htmlconv=no;block=div;ope=max:70;comm]--></a></h4></li> <!--<li><b>[var.lang_description]: </b><!--[blkfeatured.description;htmlconv=no;block=div;ope=max:68;comm]--></li>--> <li><!--<span class="font4_12">[var.lang_rating]test </span>--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star1;block=div]" width="18" height="18" alt="1 Star" />--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star2;block=div]" width="18" height="18" alt="1 Star" />--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star3;block=div]" width="18" height="18" alt="1 Star" />--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star4;block=div]" width="18" height="18" alt="1 Star" />--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star5;block=div]" width="18" height="18" alt="1 Star" />--> <!--<span class="font4_12">[var.lang_views]: </span>--><!--(<!--[blkfeatured.number_of_views;block=div;comm]-->)--> <!--<span class="font4_12">[var.lang_duration]: </span>--><!--(<!--[blkfeatured.video_length;block=div;ope=max:45;comm]-->)--> <!--<span class="font4_12">[var.lang_uploaded]: </span>--> </li> <li><!--<span class="font4_12">[var.lang_tags]: </span>--></li> <li><!--<b>[var.lang_comments] - [var.lang_responses]: </b>--><!--(<!--[blkfeatured.comments;block=div;ope=max:80;comm]-->)--></li> </ul> [onload;block=div;when [var.type_videos]=1;] </div> <!--End Video Search--> <!-- Pagination start --> <div align="center"> <div id="pagination"> <li> </li> <ul>[var.show_pages;htmlconv=no]</ul> </div> </div> <!-- Pagination end --> </div><!--End Right Column--> </form>
  5. I'm using a php video-sharing site script where you would make a purchase to view a video. The code below is from the html search results page, where a list of thumbnails appears when you search certain keywords. Currently when you select the thumbnail, to view the video, prior to paying, a page pops-up in a pop-up box(inner_purchase.htm page) showing a message. I asked someone (JG) to help me change it to just a pop-up message box to appear, rather than a page popping-up, and he added code below called Custom Message Block, but the inner_purchase page still appears, instead of the Custom Message Block. Can you help me figure out how I can make this so the Custom Message Block appears, rather than the inner_purchase page? Thanks. Any help or suggestions will be appreciated. <!--Begin Left Column--> <div id="column-left-2"> <br /> <!--Begin Whats Showing Menu--> <div class="header-narrow"><h3>[var.get_type]</h3></div> <div class="whats-showing"> <ul> <li><!--<a href="[var.url_link]/load/featured">[var.lang_featured]</a>--></li> <li><!--<a href="[var.url_link]/load/viewed">[var.lang_most_viewed]</a>--></li> <li><!--<a href="[var.url_link]/load/recent">[var.lang_most_recent]</a>--></li> <li><!--<a href="[var.url_link]/load/comments">[var.lang_most_comments]</a>--></li> </ul> </div> <div class="container-narrow-bottom"></div><!--End Whats Showing Menu--> <br /> <!--Begin Popular Tag Cloud populate from search type ??--> <!--<div class="header-narrow"><h3>[var.lang_Tags_most_popular]</h3></div>--> <!--<div class="whats-showing"><!--[var.tag_cloud_block;htmlconv=no;comm]--></div>--> <!--<div class="container-narrow-bottom"></div>--><!--End Popular Tag Cloud--> <!--Begin Left Advert--> <!--<div class="container-narrow-top"></div>--> <!--<div id="advert-left"><!--[var.ads_left;htmlconv=no;comm]--></div>--> <!--<div class="container-narrow-bottom"></div>--><!--End Left Advert--> <!--<div style="height:120px;"> </div>--> </div><!--End Left Column--> <!--Begin Right Column--> <div id="column-right-2"> <!--Begin Video Search List--> <div style="height: 2px;"> </div> <span style="margin-bottom: 12px;" class="font5_15"> "[var.keyword]" [var.get_type_word] [var.lang_search] [var.results_show] - [var.results_of] of [var.total_records] [var.lang_results] <br /> <!-- Replace ambiguous text with clear button links below. -JG --> <!-- Please Select the Continue Button to Purchase Now - Or Search Again.<br />--> <form id="buyVideo" name="buyVideo" method="post" action="buy-video.php"> <!-- CONTINUE button replaced. -JG --> <!--input type="submit" name="purchase" value="Continue" style="margin:7px 0" rel="gb_page_center[600, 435] "--> <input type="submit" name="purchase" value="Use Credits Now" style="margin:7px 0" rel="gb_page_center[600, 435] "> <input type="button" name="search" value="Search Again" onclick="window.location.href='page.php?page=9';" style="margin:7px 0"> <input type="button" name="search" value="Purchase Credits" onclick="window.location.href='credits.php';" style="margin:7px 0"> <input type="hidden" name="keyword" value="[var.keywords2]"> <input type="hidden" name="submitted" value="yes"> <input type="hidden" name="ttl" value="[var.total_price]"> <input type="hidden" name="user_id" value="[var.user_id]"> <input type="hidden" name="credits" value="[var.member_credits]"> <input type="hidden" name="id[]" value="[blkfeatured2.indexer;block=input]"></input> </span> <br><!-- Check All Box --> <input type="checkbox" name="checkall" onclick='checkedAll()'> Select All<br> <!-- end checkbox mod --> <!-- ******************************** START OF CUSTOM MESSAGE BLOCK ******************************* -JG --> <script> function doCreditCheck() { // The custom message block only appears when the PAY/SEARCH buttons are present. // The presence of those buttons indicates that you need to pay before viewing the video. document.getElementById('popupBuyMsg').style.display = 'block'; // We return false so that the href associated with this object is ignored. return false; } </script> <style> .buymsg { display:none; position:absolute; top:300px; left:300px; width:350px; background-color:#eeeeff; border-style:solid; border-width:1px; padding:15px 20px 5px 20px; } .buymsgclose { text-decoration:none; font-size:0.9em; font-variant:small-caps; margin-top:10px; } </style> <!-- Hidden message block to replace inner_purchase.htm when only a GreyBox message is being displayed. --> <div id="popupBuyMsg" class="buymsg"> You must use "credits" to view this video.<br> You have <strong>[var.member_credits]</strong> credits in your account.<br> <br /> To view this video select "Use Credits".<br> To purchase credits select "Purchase Credits".<br> Or Search Again. <div style="width:100%; text-align:right;"> <a class="buymsgclose" href="#" onclick="document.getElementById('popupBuyMsg').style.display = 'none'; return false;">Close Window</a> </div> </div> <!-- ********************************** END OF CUSTOM MESSAGE BLOCK ********************************** --> <div id="content-list"> <ul class="content-list-thumb" style="margin-top: 13px;"> <span style="margin-left: 1px;"><input type="checkbox" name="checkedBoxs[]" value="[blkfeatured.indexer;block=div]"></span><br /> <br /> <!-- Add an onclick feature that first checks to see if you need to use purchase credits. -JG --> <li><a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]" rel="gb_page_center[600, 435]"><img src="uploads/thumbs/[blkfeatured.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li> <!--li><a onclick="return doCreditCheck();" href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]"><img src="uploads/thumbs/[blkfeatured.thumb_string;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li--> </ul> <ul class="content-list-info"> <li><h4><span style="color: #000000;">[var.lang_title]:</span> <a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]" rel="gb_page_center[600, 435] "><!--[blkfeatured.title;htmlconv=no;block=div;ope=max:70;comm]--></a></h4></li> <!--<li><b>[var.lang_description]: </b><!--[blkfeatured.description;htmlconv=no;block=div;ope=max:68;comm]--></li>--> <li><!--<span class="font4_12">[var.lang_rating]test </span>--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star1;block=div]" width="18" height="18" alt="1 Star" />--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star2;block=div]" width="18" height="18" alt="1 Star" />--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star3;block=div]" width="18" height="18" alt="1 Star" />--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star4;block=div]" width="18" height="18" alt="1 Star" />--> <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star5;block=div]" width="18" height="18" alt="1 Star" />--> <!--<span class="font4_12">[var.lang_views]: </span>--><!--(<!--[blkfeatured.number_of_views;block=div;comm]-->)--> <!--<span class="font4_12">[var.lang_duration]: </span>--><!--(<!--[blkfeatured.video_length;block=div;ope=max:45;comm]-->)--> <!--<span class="font4_12">[var.lang_uploaded]: </span>--> </li> <li><!--<span class="font4_12">[var.lang_tags]: </span>--></li> <li><!--<b>[var.lang_comments] - [var.lang_responses]: </b>--><!--(<!--[blkfeatured.comments;block=div;ope=max:80;comm]-->)--></li> </ul> [onload;block=div;when [var.type_videos]=1;] </div> <!--End Video Search--> <!-- Pagination start --> <div align="center"> <div id="pagination"> <li> </li> <ul>[var.show_pages;htmlconv=no]</ul> </div> </div> <!-- Pagination end --> </div><!--End Right Column--> </form>
  6. Can you give me an example, please, of what you mean? thanks
  7. I'm using a php script that has the ability to search by keyword. When I wanted the keyword to appear on a page called inner_results.htm I was told: "you'd have to look at search.php. and see if there is a line like: $_SESSION['keyword'] = $keywords; if there is something kinda like that then you're good. You would just add the sessions.php include to the results.php page, (include_once ('classes/sessions.php') then add something like: $keywords = $_SESSION['keyword']; then in the inner_results page, wherever you want the keywords to display, add something like: You searched: [var.keywords]" So, I followed this advice and on search.php I found this: $_SESSION['searched'] = $_GET['keyword']; And I see that on results.php it already has this: include_once ('classes/sessions.php'); And on the results.php page I added this: $keywords = $_SESSION['keyword']; And on the inner_results.htm page I added this: You searched: [var.keywords] But the inner_results.htm page only shows this: You searched: Can someone suggest what I should try to make this work? Thanks
  8. I'm using a popular php video-sharing script for my web site. I've modded it so vistors must pay to view a video, however the path to the thumbnail appears on the html page in the View Source code, which is very similar to the path to the actual video. Is there any way to hide the path code?
  9. Thanks for all of the replies. I can't replace my original page of code with your suggested page of code. I wouldn't know where the syntax is incorrect, or how to fix it. Regarding this line of code: $sql = "SELECT * FROM credits ORDER BY user_name ASC"; I replaced it where instructed, refreshed the page and the users were not in alphabetical order. Any other help will be appreciated.
  10. Thanks for that clarification. I will change the line of code, as per your instructions, thanks. However, there is no "actual field name that holds the username's in your credits table". In member_profile there is "user_name". Being I'm not so versed in phpadmin, can you tell me how/where to add user_name to the credits table, please? Thanks again.
  11. Thanks for your reply. Do I now go to phpmyadmin > My database > go to members_credit table and choose SQL tab and enter: $sql = "SELECT * FROM credits ORDER BY user_name ASC"; And then select "Go"? Or is there more to it? Thanks.
  12. This php page called member_credits.php allows the admin to edit the credits on account of the member. It automatically adds the registered member's user name to the list, but it adds the member in order of who registers next. When this list gets long it will be hard to search for members to edit their credits, if needed. Is there a way to add some code so that members are listed (or sorted) alphabetically? Thanks. <?php /// - Database Information $dbhost = 'localhost'; $dbuser = 'dbase_user'; $dbpass = 'xxxxx'; $dbname = 'dbase_name'; /// - Do Not Edit Below This Line $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); ///////////////////////////////////////////////////////////////////////////////////////// $sql = "SELECT * FROM credits ORDER BY user_id"; $query = mysql_query($sql, $conn) or DIE(mysql_error()); //////////////////////////////////////////////////////////////////////////////////////// // FUNCTIONS //////////////////////////////////////////////////////////////////////////////////////// function getUsername($id) { $sql1 = "SELECT * FROM member_profile WHERE user_id = $id"; $query1 = mysql_query($sql1) or DIE(mysql_error()); $result = mysql_fetch_array($query1); return $result['user_name']; } //////////////////////////////////////////////////////////////////////////////////////// // Edit Members Credits //////////////////////////////////////////////////////////////////////////////////////// // edit members credits $uid = $_GET['id']; if (isset($uid)) { $sql = "SELECT total_credits FROM credits WHERE user_id = $uid"; $return = mysql_fetch_array(mysql_query($sql)); echo "<center><h1>Update ".getUsername($uid)."'s Credits</h1>"; echo "<form action=\"member_credits.php\" method=\"post\">"; echo "<input type=\"hidden\" name=\"user_id\" value=\"{$uid}\">"; echo "<input type=\"text\" name=\"new_credits\" value=\"{$return['total_credits']}\">"; echo "<input type=\"submit\" name=\"submitted\" value=\"Update\"></form></center>"; die(); } // Member Updated $update = $_POST['new_credits']; if (isset($update)) { $user = $_POST['user_id']; $sql = "UPDATE credits SET total_credits=$update WHERE user_id = $user"; $query = mysql_query($sql) or DIE(mysql_error()); if ($query) { echo "<center>Success! ".getUsername($user)." has been updated."; echo "Click <a href=\"member_credits.php\">HERE</a> to return to list</center>"; die(); }else{ echo "There was a problem."; die(); } } ?> <html> <head> <title>Members Credits</title> </head> <body> <center> <H1>Members Credits</h1> <table border="1" bordercolor="#000000"> <tr> <td><b>user</b></td> <td><b>credits</b></td> <td><b>edit</b></td> </tr> <? while($row = mysql_fetch_array($query)) { echo "<tr><td>".getUsername($row['user_id'])."</td>"; echo " <td>".$row['total_credits']."</td>"; echo " <td><a href=member_credits.php?id=".$row['user_id'].">Edit Credits</a></td>"; echo "</tr>"; } ?> </table> </center> </body> </html> <? mysql_close($conn); ?>
  13. The file that contains the header and footer is main.htm
  14. Thanks. To reply: /home/public_html/payment/classes/config.php does not exist. ../ 's or just put the full path from public html - this showed no errors, but also no header/footer. Any other suggestions. Thanks.
  15. I have header and footer showing on most web pages, but not this one added later. I tried copying a few lines from another page that HAS the header and footer appearing, but got many errors which I've listed below. (The page code shown below I've extracted some lines of private data) Any help with trying to add header and footer to it will be appreciated. Working page without header/footer: <?php // Get Details $amount = $_POST['valu']; $credits = $_POST['cre']; $user_id = $_POST['uid']; $item_name = $_POST['itnm']; // Include the paypal library include_once ('Paypal.php'); // Create an instance of the paypal library $myPaypal = new Paypal(); // Specify your paypal email // Specify the url where paypal will send the user on success/failure // Specify the url where paypal will send the IPN // Specify the product information $myPaypal->addField('item_name', $item_name); $myPaypal->addField('amount', $amount); $myPaypal->addField('item_number', $credits); // Specify any custom value $myPaypal->addField('custom', $user_id); // Enable test mode if needed ///$myPaypal->enableTestMode(); // Go $myPaypal->submitPayment(); Added some lines from other page that has header/footer as an attempt, but got errors: <?php (include_once ('classes/config.php'); (include_once ('classes/sessions.php'); // Get Details $amount = $_POST['valu']; $credits = $_POST['cre']; $user_id = $_POST['uid']; $item_name = $_POST['itnm']; // Include the paypal library include_once ('Paypal.php'); // Create an instance of the paypal library $myPaypal = new Paypal(); // Specify your paypal email // Specify the url where paypal will send the user on success/failure // Specify the url where paypal will send the IPN // Specify the product information $myPaypal->addField('item_name', $item_name); $myPaypal->addField('amount', $amount); $myPaypal->addField('item_number', $credits); // Specify any custom value $myPaypal->addField('custom', $user_id); // Enable test mode if needed ///$myPaypal->enableTestMode(); // Go $myPaypal->submitPayment(); The errors were: Warning: include_once(classes/config.php) [function.include-once]: failed to open stream: No such file or directory in /home/public_html/payment/thispage.php on line 3 Warning: include_once() [function.include]: Failed opening 'classes/config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/payment/thispage.php on line 3 Warning: include_once(classes/sessions.php) [function.include-once]: failed to open stream: No such file or directory in /home/public_html/payment/thispage.php on line 4 Warning: include_once() [function.include]: Failed opening 'classes/sessions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/payment/thispage.php on line 4 Any help/thoughts/suggestions will be appreciated.
  16. Is there a way to Search PHPfreaks by user name only? When I try it asks for search words.
  17. I'm working with a php script that has a form for uploading video files. One of the choices in the form is to choose a "channel". I'd like help in changing this, so the user doesn't have to choose, it's always the same channel choice. I was given some advice, but I could use some more information. Here is the existing code that i'd like to change. And below that is the advice I was given. <li style="width:240px; text-align:right;"><strong>[var.lang_select_channel]:</strong></li> <li style="width:400px; text-align:left;"> <select class="upload-video-form-input" style="width:160px;" size="1" name="channel" onchange="javascript:ahahscript.ahah('[var.base_url]/uploader.php?sub_cat='+ document.form_upload.channel.value, 'sub_change', '', 'GET', '', this);"> [var.fields_all;htmlconv=no]</select> ([var.lang_select_one]) </li> The advice: "You need to remove the select input, and add this type of hidden input: <input type="hidden" name=" Can someone help me create the right replacement code, so it will hidden and automatically choose a single channel? Thanks.
  18. I'd like to change the color of this one word that appears at: [var.lang_edit_profile]. How do I add font color to this line: <li><strong><!--[onload_829;block=li;when [var.profile_menu]=1;comm]--><a href="[var.base_url]/edit/editprofile.php?id=[var.member_id]" rel="gb_page_center[870, 450]">[var.lang_edit_profile]</a> </strong></li> Thanks
  19. Thanks for your reply. If I add $ip = $_SERVER[REMOTE_ADDR]; to my registration page and add a corresponding field in my database, this will allow me to capture the IP address of the regisrtant? Should the db field be named REMOTE_ADDR ? Obviously I could use some more information. Any additional enlightening would be appreciated.
  20. I'm using a php script for my web site which has registration, log-in, etc. Can you tell me how I might be able to capture the registrants IP adress upon registration? Thanks.
  21. Thanks for your reply. Here is the page of code: <?php session_start(); //CHECK IF FORM SUBMITTED if ($_POST['submitted'] == 'yes') { $pages = $_POST['id']; if (!isset($_POST['id'])) { echo "<script>document.location.href='index.php'</script>"; die(); } $skey = $_SESSION['searched']; if ($_POST['user_id'] != "") { $member_id = $_POST['user_id']; } if ($_POST['ttl'] != "") { $total = $_POST['ttl']; } } foreach ($pages as $vid) { $my_db_info[] = $vid; } include_once ('classes/config.php'); include_once ('classes/functions.inc.php'); $member_credits = get_member_credits($member_id); $balance = $member_credits - $total; if ($member_credits >= $total && $balance >= 0) { for( $x = 0; $x < sizeof( $my_db_info ); ++$x) { $sql = "INSERT INTO credits_temp ( mem_id, vid_id ) VALUES ( $member_id, $my_db_info[$x] )"; $query = @mysql_query($sql); } $sql1 = "UPDATE credits SET total_credits=$balance where user_id=$member_id"; //subtract credits $query1 = mysql_query($sql1); if ($query1 && $query) { $result = "Success! Payment Complete!<br><br>"; $rlink = "search.php"; //$rlink = "search.php?".$slink; $rtitle = "Go To Display"; }else{ $result = "There was a problem processing your request. Try again later or"; $rlink = "page.php?page=2"; $rtitle = "Contact Support"; } } else{ $error = "You do not have enough credits. To purchase credits, "; $rlink = "credits.php"; $rtitle = "Click Here"; } $template = "themes/$user_theme/templates/main_1.htm"; $inner_template1 = "themes/$user_theme/templates/inner_buy.htm"; //middle of page $TBS = new clsTinyButStrong; $TBS->NoErr = true; // no more error message displayed. $TBS->LoadTemplate("$template"); $TBS->MergeBlock('mp', $members_full); $TBS->Render = TBS_OUTPUT; $TBS->Show(); @mysql_close(); die(); /* // show "nothing to show" empty arrays if (empty($result_featured)) { $show_v = 1; } else { $show_v = 2; } // display results $template = "themes/$user_theme/templates/main_1.htm"; $inner_template1 = "themes/$user_theme/templates/inner_buy.htm"; //middle of page $TBS = new clsTinyButStrong; $TBS->NoErr = true; // no more error message displayed. $TBS->LoadTemplate("$template"); $TBS->MergeBlock('blkfeatured', $result_featured); $TBS->Render = TBS_OUTPUT; $TBS->Show(); @mysql_close(); die(); */ ?>
  22. Enable html is probably good advice, but I don't know what in particular to do with that in regard to my request for help.
  23. Thank you for your reply, but your suggestion appears on the web page like this: Success! Payment Complete! <br><br> Any other suggestions, would be appreciated.
  24. Thanks for that reply. I tried this: $result = "Success! Payment Complete!"<br><br>; and I tried this: $result = "Success! Payment Complete!"; <br><br> $rlink = "search.php"; //$rlink = "search.php?".$slink; $rtitle = "Go To Display"; Both were unsuccessful.
  25. In this if/else function (below), how can I put some space between "Success! Payment Complete!" and "Go To Display". When it shows up on the web page those two lines are stacked right on top of each other. How do I put some space between them? Thanks if ($query1 && $query) { $result = "Success! Payment Complete!"; $rlink = "search.php"; //$rlink = "search.php?".$slink; $rtitle = "Go To Display"; }else{ $result = "There was a problem processing your request. Try again later or"; $rlink = "page.php?page=2"; $rtitle = "Contact Support"; } }
×
×
  • 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.