-
Posts
382 -
Joined
-
Last visited
Never
Everything posted by steviez
-
Hi, On my site i need to delete multiple files at once, the files would be selected by a check box and then you would hit delete. How would i make php handle this? Steve
-
Hi, does anyone know of a way to backup all of the files and folders in a dir with php? i need them to be "zipped" up and either put to a remote location via ftp or emailed. Any help would be great. Steve
-
Hi, I am trying to make a new signup system for my site, there will be three signup steps to complete before you will be signedup. Ho do i make all the data from the parts available at the end step for them to be inserted in to the database? Any help would be great! Steve
-
this is a javascript question...
-
hi, open firefox and click on file->work offline and untick it See if that helps Steviez
-
Shame cos i dont use any of that on my site, maybe its a bit too hard to do for me then
-
Hi, I am making a download script for my site and i want to make it so that if someone is already downloading a file they cant download another until its finished, I can get the users ip in to my db when the download starts but ho could i get it to remove from the db when the download has finished? Any help would be great. Thanks
-
Hi, Im not sure if this is the correct forum so please tell me if its not. I need to get my results to display in a horizontal row and have a max of 5 per row, Here is my code so far: {section name=cat_loop loop=$cats} {section name=subcat_loop loop=$cats[cat_loop].subcats} <div class='profile_headline{if !$smarty.section.subcat_loop.first}2{/if}'><b>{lang_print id=$cats[cat_loop].subcats[subcat_loop].subcat_title}</b></div> <table cellpadding='0' cellspacing='0'> {* LOOP THROUGH FIELDS IN TAB, ONLY SHOW FIELDS THAT HAVE BEEN FILLED IN *} {section name=field_loop loop=$cats[cat_loop].subcats[subcat_loop].fields} <tr> <td valign='top' style='padding-right: 10px;' nowrap='nowrap'> {lang_print id=$cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_title}: </td> <td> <div class='profile_field_value' style="{$cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_style}"> {$cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value_formatted} {if $cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_special == 1 && $cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value|substr:0:4 != "0000"} ({lang_sprintf id=852 1=$datetime->age($cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value)}){/if} </div> </td> </tr> {/section} </table> {/if} {/section} {/section} Any help would be great!
-
Hi, Im not sure if this is possable but if it is can someone please point me in the right direction. I am wanting to create my own error pages so that if a php error occurs then it shows my error page and error info and no the php generated one. Thanks
-
their bandwidth is stored in the database and when they are over the set limit they cant use anymore until its reset.
-
Would this do it? <?php $member = sql_row("SELECT * FROM members"); $resetTime = strtotime('-30 days'); $nowtime = time(); $lastReset = $member['bandwidth_last_reset']; if (($nowtime - $lastReset) > $resetTime) { echo $member['username']; } ?>
-
anyone know how to do this?
-
Yes thats 100% correct. sorry for all the confusion
-
As i say here i want to reset the bandwidth of each user after 30 days and everything else stays as is.
-
no, i want to reset users bandwidth after say 30 days
-
I am wanting to include the code in the overall header of the script
-
i dont want to use cron, just php.
-
im not using cron due to me not having access to it, i want to do it via php but im not sure how to make the code.
-
Hi, I am making a new file hosting script for my site and need to reset my users bandwidth every 15-30 days. I store the last reset time in the database using php time() but im not sure how to make the code work to reset at the time i say. Any help would be great. Thanks
-
Hi, I have created some pagination code for my script and need some help to iron out a bug. When there are no more results to show i want the next button to not show but no matter what i do it always shows enableing the user to navigate through blank pages. Here is my code: <?php // Limit Results On Page $max_results = 9; $total_results = @mysql_result(mysql_query("SELECT COUNT(*) as Num FROM uploads WHERE album_id = '".$_GET['galleryID']."'"),0); $total_pages = ceil($total_results / $max_results); if(!isset($_GET['startrow']) or !is_numeric($_GET['startrow'])) { $startrow = 0; }else{ $startrow = (int)$_GET['startrow']; } if($total_results > $max_results) { $next_link = $site_url . '/albums.php?galleryID='.$_GET['galleryID'].'&startrow='.($startrow+$max_results).''; $next = "<a href=\"".$next_link."\" title=\"Next\" /><img src=\"".$site_url."/templates/css/images/next.gif\" alt=\"Next\" width=\"16\" height=\"16\" style=\"border:none;\" /></a>"; } if($startrow !== 0) { $previous_link = $site_url . '/albums.php?galleryID='.$_GET['galleryID'].'&startrow='.($startrow-$max_results).''; $prev = "<a href=\"".$previous_link."\" title=\"Previous\" /><img src=\"".$site_url."/templates/css/images/previous.gif\" alt=\"Previous\" width=\"16\" height=\"16\" style=\"border:none;\" /></a>"; } ?> Any help would be awsome
-
Hi, I am trying to make a mime function thet wil return the correct file icon for the file, i am not 100% with php and as you can guess i cant get my function to work Here is what i have so far: <?php function mimeIcon($params, &$smarty) { $q = @mysql_query("SELECT * FROM uploads WHERE id = '".$params['fileID']."' AND owner = '".clean($_SESSION['username'])."'"); $file = @mysql_fetch_array($q); $mime = $row['file_type']; function type($mime) { $icons = array ( 'default' => 'file.gif', // images 'jpg' => 'images.gif', 'jpeg' => 'images.gif', 'png' => 'png.gif', 'gif' => 'gif.gif', // media 'avi' => 'video.gif', 'wmv' => 'video.gif', 'mpeg' => 'video2.gif', 'mpg' => 'video2.gif', 'mov' => 'quicktime.gif', 'mp3' => 'mp3.gif', // Archives 'application/x-zip-compressed' => 'zip.gif', 'application/force-download' => 'zip.gif', 'application/x-rar' => 'zip.gif', // documents 'pdf' => 'acrobat.gif', 'ppt' => 'powerpoint.gif', 'txt' => 'text.gif', 'doc' => 'word.gif', 'xls' => 'excel.gif', ); return $icons[$extension]; } } ?> Any ideas?
-
I did this but it wont work <?php function isInstalled() { $installed_server = $_SERVER['HTTP_HOST']; $from = "from"; $email = "install@mydomain.com"; $recipient = "me@me.com"; $mail_body = "New install at: ".$installed_server.""; $subject = "New Install"; $header = "From: ". $Name . " <" . $email . ">\r\n"; if($installed == false) { mail($from, $subject, $mail_body, $header); } return; } isInstalled(); ?>
-
Hi, Is there a way i can track installs of my script, i want to track when a user buys the script and installes it returning the url installed etc. Thanks
-
thanks for your help, ill look in to this.
-
so there is no way to reset limits on a users account every 24hrs without cron?