Script Tips


NetBizCity - Script Tips
Wednesday, 15 February 2012 01:24

WHMCS Template viewer

Written by
How to view your WHMCS Template before you upload it WHMCS uses Smarty templates which can be setup on your PC to view your changes before you upload them. Of course there are some linits as the variables must be set for each page which make it a bit of a task. But if all you want to do is edit the header and footer then I have done the work for you. Create a…
Sunday, 14 February 2010 14:08

Uploading Files

Written by
Uploading files with PHP   To upload files with php is pretty simple. We first start with a basic form and add enctype plus method = post. <form action="index.php" enctype="multipart/form-data" method="post"> <input type="file" name="upload" size="40"> <input type="submit" name="start_upload" value="Start Load"> </form> You can place this form on any page but will need to change the action= to match the name of the php script you create. In our example we named it index.php but it…
Wednesday, 28 October 2009 11:41

How to customize the WHMCS Status page

Written by
Customizing the WHMCS Status Page on version 5.12 and lower.   To change the status page you need to edit the template file serverstatus.tpl. This is located under templates/default. The lines as follows that come as the default can be changed. <tr class="clientareatableheading"> <td>{$LANG.servername}</td> <td>HTTP</td> <td>FTP</td> <td>POP3</td> <td>{$LANG.serverstatusphpinfo}</td> <td>{$LANG.serverstatusserverload}</td> <td>{$LANG.serverstatusuptime}</td> </tr> {foreach key=num item=server from=$servers} <tr class="clientareatableactive"> <td>{$server.name}</td> <td>{get_port_status num="$num" port="80"}</td> <td>{get_port_status num="$num" port="21"}</td> <td>{get_port_status num="$num" port="110"}</td> <td><a href="{$server.phpinfourl}" target="_blank">{$LANG.serverstatusphpinfo}</a></td> <td>{$server.serverload}</td> <td>{$server.uptime}</td> </tr> As we…
Tuesday, 08 September 2009 15:49

Remote Desktop Connection

Written by
How to setup Remote Desktop   To setup a remote connection to your PC takes a few steps to do. Most people use routers and if you are using one you need to not only make changes to your PC settings but also have to add a Port Forward in your Router. You need to get your ISP IP address and you need to set a fixed IP on your PC so first we will…
Monday, 27 April 2009 21:42

Time Left Counter

Written by
This script will give you a count down of Years, Months, Days and Hours left to a given date. function cdtime( targetdate){ var currentTime=new Date() var tdate=new Date(targetdate) var timesup=false var timediff=(tdate - currentTime)/1000 var oneHour=3600 //hour unit in seconds var oneDay=86400 //day unit in seconds var oneMonth=2630880 //month unit in seconds var oneYear=31570560 var yearfield=Math.floor(timediff/oneYear) timediff = timediff - (yearfield * oneYear) var monthfield=Math.floor(timediff/oneMonth) timediff = timediff - (monthfield * oneMonth) var dayfield=Math.floor(timediff/oneDay) timediff…
Monday, 16 February 2009 16:50

Cron Jobs

Written by
Cron Jobs Linux has a very nice tool for those that want to have a scheduled action of some sort. The cron job allows you to set a script or command to run on a schedule that you set. The syntax for the command looks like this: 0 9 * * * * /home/mysite/cgi-bin/somescript.cgi You may want it to delete files every so often in a folder that has cache or other files that build…
Monday, 09 October 2006 23:19

Dealing with Downloading files

Written by
Helpful tips for File Download There are several ways to handle file download. The best ways due to speed and Browser compatibility are third party upload/download products. Two of the most popular are Persits ASPUpload and SA's Fileup. These examples will show typical code associated with both. For Persits: To visit their Web Site Persits Software Version 2 is a problem with some browsers - I suggest using version 3 on error resume next Dim…
Monday, 09 October 2006 13:16

Remote Scripting

Written by
Remote Scripting Many in the RS World are turning to the XML Parser from MicroSoft Using XMLHTTP you can acomplish remote scripting but there are pit falls. The biggest pitfall is calling a page in the same directory will crash the server. There is nothing to install or download, the parser is supported by most browsers JSRS: This method uses an Iframe to accomplish similar functionality. Other than this problem with the history bug in…
Monday, 09 October 2006 03:15

Dealing with an Access database on the WEB

Written by
How to maintain an Access Database on the WEB If you are setting up a Internet or Intranet site and really don't need to use SQL Server or Oracle as your database - Access may just do the trick. The only problem is when you need to modify the database or import data. The question becomes how do you do it. You don't want to overwrite the database file because this can be a problem.…
Monday, 09 October 2006 03:12

Add an Email Form to your Site

Written by
ASP Email Want to add a contact us screen to your site but hide your email address? Below is a sample and code to do just that. This code uses the CDONT ASP Activex object to send mail This is the code for the sender and form Place this form and this script on your page     <%  dim s_from, s_url, s_msg, rtn_msg, s_send_addr, rtn  '--------------------------------------------------  'Set to your return address    s_send_addr= "myemail@my_url.com"…