Welcome to ArKane Scripts!

Custom PHP programming, AJAX, CSS, MYSQL proggramming and web templates

Custom PHP and MYSQL application development, Website and Logo Design and Web Templates

I ran across a great tutorial on using EXT JS Grid. The tutorial is located here:
http://defafe.com/tutorial-extjs-edit-delete-and-add-file

Since the tutorial is over three different example is can be confusing to the beginner. I went ahead and prepared the complete example give in one easy to download file.

 Download the gridbase.zip file demo here

I ran across this article on list styling. You might find it useful.

Top 10 programs For the Budding PHP web designer

  • Eclipse

Many PHP programmers will tell you that the only way to program is with notepad. While this can give you ‘cred, it can be a heartache when trying to find error just starting out. Why put yourself through the pain? Eclipse is a full featured PHP editor. And its free that’s the best part.

You can view the various editors available here http://www.eclipse.org/pdt/downloads/

  • GIMP

GIMP is a versatile graphics manipulation package, very similar to ADOBE PHOTOSHOP without the $699 price tag.

http://www.gimp.org

  • INKSCAPE

Inkscape is a another graphics editing program that allows you to design vector based graphics for your web pages.

http://www.inkscape.org

  • XAMPP

XAMPP is a PHP, MYSQL, APACHE web server that runs on multiple platforms. It will allow you to create your own web server to test the latest l33t website you designed, locally on your computer before releasing your coding creation on the world!

http://www.apachefriends.org/en/xampp.html

  • FIREFOX

As a programmer you will want to test your creation cross platform, and with Firefox’s market share in the browser wars you will want to make sure your website performs well in this browser. Additionally Firefox has a host of plug-ins to help you in your programming pursuits.

http://www.mozilla.com/en-US/firefox/

http://www.arkanedomains.com

ArKane Domains is now live. It will allow you to sign-up, registar a domain and host your website for $.99 cents per month.

Many web hosting companies advertise a “teaser” rate, that requires the customer to pay for a full year of hosting before they get the advertised price. At ArKane Domains we offer affordable domain hosting with our NO BULL guarantee. The price you see is the price you pay for your hosting package, and we offer bigger discounts if you choose to be billed Quarterly, Bi-Yearly, or Annualy.

http://www.arkanedomains.com

Domain Hosting

I am in the process of setting-up a domain hosting company. Its will be an extension of this website and will be located at Arkane Domains

I want to keep the cost lower than most hosting companies out there because as a budding PHP programmer it can be a real pain when you are tring to start your own business and having to pay rediculus prices just to get started. More to follow.

Designing A PHP calendar

I have been working on an appointment booking application for the company I work for. I looked for several “out of the box” solutions, but none met the needs of the company. The dispatcher needed a way to go paperless, assign work to repair technicians and give them a daily print out of their work. One of the first tasks way developing a clickable calendar sof the dispatcher to switch days.

The first part is generating a static calendar.

The next part is generating the calendar with links to previous and next months

<table width="100%" cellpadding="0" cellspacing="0">
    <tr align="center">
         
<td align="center"colspan="7" style="color:#000; white-space:nowrap; font-family: Verdana, Geneva, sans-serif; font-size: 14px;"><strong><?php echo $monthNames[$cMonth-1].' '.$cYear; ?></strong></td>
<td width="10%" align="left" class="style2"><a href="<?php echo $_SERVER["PHP_SELF"] . "?month=". $prev_month . "&year=" . $prev_year; ?>" style="color:#144cef"><img border="0" src="img/back_cal.png" width="16" height="16" /></a></td>
<td width="10%" align="left" class="style2"><a href="<?php echo $_SERVER["PHP_SELF"] . "?month=". $next_month . "&year=" . $next_year; ?>" style="color:#144cef"><img border="0" src="img/next_cal.png" width="16" height="16" /></a></td>                
                  
      </tr>        
</table>
<table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="center">Su</td>
                  <td align="center">Mo</td>
                  <td align="center">Tu</td>
                  <td align="center">We</td>
                  <td align="center">Th</td>
                  <td align="center">Fr</td>
                  <td align="center" class="style1">Sa</td>
                </tr>
<?php
# Print The calendar with links to the days w/ postback</code>

$monthNames = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
 if (!isset($_REQUEST["month"])) $_REQUEST["month"] = date("m");
 if (!isset($_REQUEST["year"]))  $_REQUEST["year"]  = date("Y");
 if (!isset($_REQUEST["day"]))  $_REQUEST["day"]  = date("d");

if  (empty($_REQUEST["day"]) || empty($_REQUEST["year"]) || empty ($_REQUEST["month"])) {
$day=date('d',mktime(0,0,0,date('m'), date('d'), date('Y')));
$month=date('m',mktime(0,0,0,date('m'), date('d'), date('Y')));
$year=date('Y',mktime(0,0,0,date('m'), date('d'), date('Y')));

}else{

$day=$_REQUEST["day"];

}

$cMonth=$_REQUEST["month"];
$cYear =$_REQUEST["year"];
$cdaydo=date('Y-m-d',mktime(0,0,0, date($_REQUEST["month"]), date($day), date ($_REQUEST["year"])));
$cdaydo2=date('l, F j',mktime(0,0,0, date($_REQUEST["month"]), date($day), date ($_REQUEST["year"])));             
$prev_year=$cYear;
$next_year = $cYear;
$prev_month = $cMonth-1;
$next_month = $cMonth+1;

if ($prev_month==0) {
$prev_month=12;
$prev_year=$cYear-1;
  }
 
if ($next_month==13 ) {
$next_month=1;
$next_year=$cYear+1;
  }

?>

                 $timestamp = mktime(0,0,0,$cMonth,1,$cYear);
                 $maxday    = date("t",$timestamp);
                 $thismonth = getdate ($timestamp);
                 $startday  = $thismonth['wday'];
    
                  for ($i=0; $i<($maxday+$startday); $i++) {
      
#color the tds for current date, date selected, unassigned, locked, all assigned, still need assigned

$real  = date("Y-m-d");
$dafont = ($i - $startday + 1);
$tod = date("Y-m-d", mktime(0,0,0,$cMonth,$dafont,$cYear));
$tod2 = date("Y-m-d", mktime(0,0,0,$cMonth,$day,$cYear));

if ($real == $tod) {$st = "border: 1px dashed red;";}else{$st = "";} 
if ($tod2 == $tod) {$st1 = "border: 1px solid black;";}else{$st1 = "";}
if($totalRows_Recordset1 > 0 && $tech_id == 0){$st2 = "background-color: #EEEED8;";}else{$st2 = "";}
if($totalRows_Recordset1 > 0 && $tech_id > 0){$st3 = "background-color: #77EE00;";}else{$st3 = "";}
#add the styles up and apply them

$style = $st . $st1 . $st2 . $st3;
#end coloring and borders

     if(($i % 7) == 0 ) echo "<tr>\n";
                    if($i < $startday) echo "<td></td>\n";
     
     else

#change manage.php to the php file with this code in it.

echo "<td style='" . $style . "' align='center' valign='center' height='25px' width='25px'><a href ='manage.php?&year=" . $cYear . "&month=" . $cMonth . "&day=" . $daydo =($i - $startday + 1) . "'>" . ($i - $startday + 1) . "</a></td>\n";

$style = "";     

     if(($i % 7) == 6 ) echo "</tr>\n";
     
         
     
} 
 # End Print the Calendar

?>

Developing a logo for yourself or a customer can be a difficult challenge. Trying to find the right balance of curbside appeal and encapsulating the theme of the website in a picture and a few words is the key to successful logo design. It is very similar to the artists of times past, the only thing that has changed is the medium on which the designer creates his or her artwork. There is a number of free tools available that will help you in your design work.

Gimp is a tool very similar to Adobe Photoshop but without the $699.00 price tag. You can create logos, edit photos, and do just about any type of computer graphics work with this program.

For those that would like to create vector graphics inkscape is another great tool that is comparable to Adobe Illustrator, again without the hefty price tag.

Installing a Web Server

If your like me, I was amazed by the things that can be done via a modern browser. Web Pages have progressed from simple static snapshots to fully interactive applications. There is nothing more satisfying than coding a page and seeing folks use what you have created.

Making a page dynamic is a bit of a challenge but once you understand “what makes it tick” you will start understanding how and why it works.

There is many programming languages you can use to make an interactive website. By far the most eaisiest is PHP with a MYSDQL backend for your database needs. The best part is that it’s free!

First you will want to install a webserver, by which you can test your creations. If your using a Windows machine, you can use Xampp. The package includes Apache, PHP and MYSQL and is very easy to set-up and configure.

If you need help installing Xampp on your machine, we can do this for you for $25, or click on one of the links below for some great tutorials

http://www.apachefriends.org/en/faq-xampp-windows.html

http://www.keitr.com/tutorials/xampp

http://www.netbeans.org/kb/docs/php/configure-php-environment-windows.html

http://techwhimsy.com/local-development-installing-xampp

 

Part 2 of this series comming soon