GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 28-Apr-2008, 04:22
oggie oggie is offline
Awaiting Email Confirmation
 
Join Date: Nov 2007
Location: tattershall, UK
Posts: 28
oggie is on a distinguished road

calendar - syntax error


PHP Code:

<?php
my.calender <month> <year> [color="Red"][/color] This where the problem is. Parse error: syntax error, unexpected '>' in /home/ogl10b7/public_html/EricsCarRepairs/bookings.php on line 134 - need some help.

//This Command Will Display Calender for Requested month from year 1 AD onwards.
//Try Its Your Self  ..... Comment/Support/Question: [email]mindforce83@yahoo.com[/email] - BiskutMeri - Mascovy - © 2004 
//Full credit to Mascovy.  Modified 2005 by splatted

alias my.calender { 
//Change / edit this script if you like.... :)
//Checking Validation input
  var %month = January Febuary March April May June July August September October November December , %mont = $1
  if ($1 isalpha) var %mont = $findtok(%month,$1,32) 
  if ($2 < 1)  { echo 12*** Year Must Be From 1 AD Onwards | halt }
  if ($2 !isnum) || (!%mont) || (%mont > 12) { echo 12*** Invalid Input:/my.calender Month Years | halt }

//Create Active Window
  var %win = $+(@,Calender,$chr(160),$gettok(%month,%mont,32),$chr(160),$2) 
  if (!$window(%win)) window -aBkpRd +elz %win 150 150 180 180

//Creating Template
  var %sday = Mon Tue Wed Thu Fri Sat Sun ,%tnum = 0 , %cmap = 30 , %xgb = 14009920 12886011 12441728 16051111 14995685 13558433 11389371
  while (%tnum < $numtok(%sday,32)) {  inc %tnum |  drawrect -fr %win $gettok(%xgb,%tnum,32) 5 1 %cmap 170 15 | drawtext -o %win 12 "Times New Roman" 12 5 %cmap $gettok(%sday,%tnum,32) | inc %cmap 15 }
  drawtext -o %win 6 "Comic Sans Ms" 12 25 5 $+([,$gettok(%month,%mont,32) $2,]) | drawtext %win 1 "Comic Sans Ms" 10 80 140 $decode(LU1hc2NvdnktrjIwMDQ=,m)

//Calculation
  var %dayz = 31 28 31 30 31 30 31 31 30 31 30 31, %loop = 1
  var %x = $int($calc($calc($2 - 1) / 4)), %y = $calc($calc(%x * 366) + $calc($calc($2 - 1 - %x) * 365))
  while (%loop != %mont) { inc %y $gettok(%dayz,%loop,32) | inc %loop }
  if (%mont > 2) && (4 // $2) { inc %y 1 }
  var %z = $calc($int($calc(%y / 7)) * 7)
  var %a = $calc(%y - %z - 1 )
  while (%a >= 7) { dec %a 7 }
  while (%a <= -1) { inc %a 7 }
  var %lajur = 45, %setting = 30 45 60 75 90 105 120, %day = Mon Tue Wed Thu Fri Sat Sun, %min = 1, %p = $gettok(%dayz,%mont,32)
  if (%mont = 2) && (4 // $2) { %p = 29 } 
 while (%min <= %p) {
    var %code = $gettok(%day,$calc(%min + %a),32)
    if $istok(%day,%code,32) { drawtext -o %win 1 "Times New Roman" 12 %lajur $gettok(%setting,$findtok(%day,%code,32),32) $iif(%min < 10,$+(0,%min),%min) }
    ;Change To New Vertical Position
    if (%code == sun) { inc %lajur 20 | dec %a 7 }
    inc %min
  }
}
menu @calender* {
  &Save:{ var %mfiles =  $sfile($logdir,Select Filename,&Save) |  if (%mfiles) { drawsave -q100 $active $iif(!$numtok(%mfiles,46) == 0,$+(",%mfiles,.jpg"),$+(",%mfiles,")) | echo 12*** File Save $iif(!$numtok(%mfiles,46) == 0,$+(",%mfiles,.jpg"),$+(",%mfiles,")) } } 
}
menu status,menubar,channel,query { 
  -
  &My Calender:my.calender $input(In order to view the calender please state Month And Year $crlf $str($chr(160),5) Example. October 2004 $str($chr(160),5) or  $str($chr(160),5) 10 2004,ieo,Require Month And Year) 
}
?>





Thanx Ian

PS does anyone know where I can get a script for a graph that displays interactive data. I mean someone can enter data in boxes then it goes to a MySQL database, and puts the result into the graph???? I have looked at applets but seem complicated..
Last edited by LuciWiz : 29-Apr-2008 at 08:31. Reason: Please insert your Php code between [php] & [/php] tags
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two-Tier data dissemination code installation problem nidhibansal1984 Computer Software Forum - Linux 6 16-Sep-2007 11:13
Major newbie problem cynack MS Visual C++ / MFC Forum 1 08-Apr-2007 12:25
Winsock error when compiling FLTK 2.0 Projects mauriciorossi FLTK Forum 3 16-Aug-2005 11:18
Help with syntax errors PeteGallo C Programming Language 7 08-Aug-2005 21:30
Can enum have same name as class? crystalattice C++ Forum 3 08-Dec-2004 17:43

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:00.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.