\n"); #print_r($_POST); #print_r($_GET); #print_r($HTTP_SESSION_VARS); #print_r($_SERVER); echo("\n"); $username="lazarus_toomey"; $password="wizzb"; $database="lazarus_toomey"; if ($_GET['function']) $state="function_".$_GET['function']; if ($_POST['state']) $state=$_POST['state']; $notenum=$_GET['notenumber']; if ($_POST['notenumber']) $notenum=$_POST['notenumber']; $subject=$_POST['subject']; $note=$_POST['note']; $type=0+$_POST['notetype']; $todo=0+$_POST['notetodo']; $daysback = 60; connectAndSelectDB($username,$password,$database); switch ($state) { case "Preview Email": updateChecks(); drawHeader(); previewEmail(); displayOldDays($daysback); drawFooter(); break; case "Preview Print": updateChecks(); previewPrint(); break; case "Update Checks": updateChecks(); drawHeader(); drawFullLetter(); displayOldDays($daysback); drawFooter(); break; case "Send Email": drawHeader(); redAlert("Should have sent email"); drawFullLetter(); displayOldDays($daysback); drawFooter(); break; case "Send Text Message": drawHeader(); sendNote($notenum); drawFullLetter(); displayOldDays($daysback); drawFooter(); break; case "Add Note": addNote($subject, $note, $type, $todo); drawHeader(); drawFullLetter(); displayOldDays($daysback); drawFooter(); break; case "Update Note": updateNote($notenum, $subject, $note, $type, $todo); drawHeader(); drawFullLetter(); displayOldDays($daysback); drawFooter(); break; case "function_delete": drawHeader(); deleteNote($notenum); redAlert("Deleted note number ".$notenum); drawFullLetter(); displayOldDays($daysback); drawFooter(); break; case "Add New User": drawHeader(); submitContact(); drawSettings(); displayOldDays($daysback); drawFooter(); break; case "function_settings": drawHeader(); drawSettings(); displayOldDays($daysback); drawFooter(); break; case "function_edit": drawHeader(); redAlert("Editing note number ".$notenum); editNote($notenum); displayOldDays($daysback); drawFooter(); break; case "function_sendsms": echo "Sending note number ".$notenum; drawHeader(); drawSMSSender($notenum); displayOldDays($daysback); drawFooter(); break; case "function_copytotoday": echo "Copying note number ".$notenum; break; case "Cancel": drawHeader(); drawFullLetter(); displayOldDays($daysback); drawFooter(); break; case "": drawHeader(); drawFullLetter(); displayOldDays($daysback); drawFooter(); } mysql_close(); function sendNote($t_notenum) { $text = getNoteText($t_notenum); sendToTextmark($text,6178880545); } function drawSMSSender($note_number) { $text = getNoteText($note_number); echo "
"; drawMainTitle("Send A Text Message"); ?>
Send As Text Message
$text_maxlength) { $str1=substr($text,0,$text_maxlength); $str2=substr($text,$text_maxlength,strlen($text)-$text_maxlength); echo "
"; echo $str1; echo "
"; echo $str2; echo "
"; echo "
"; $alert = "Warning: This note is too long to be texted in full. "; $alert = $alert."The max length is ".$text_maxlength." characters, and everything displayed in red text will be CUT OFF. "; $alert = $alert."You may want to Edit this note."; redAlert($alert); } else { echo "
"; echo $text; echo "
"; } ?>
"; echo ""; echo "Edit Note"; echo ""; echo ""; ?>
"; } function getNoteText($note_num) { $row = retrieveRowByNotenum($note_num); $temp_subject=getEncoded($row['subject']); $temp_note=getEncoded($row['note']); return $temp_subject." >".$temp_note; } function drawHeader() { echo "
"; echo "
"; $function="settings"; echo ""; echo "Settings"; echo ""; echo "
"; echo "
"; drawLoginInformation(); echo "
"; echo ""; echo "Toomey Notes"; echo ""; echo "
"; echo "
"; } function drawLoginInformation() { echo "Currently logged in as: "; echo $_SESSION['user']; } function redAlert($alert_text) { echo "
"; echo $alert_text; echo "
"; } //############### LABELS ######################### function ifTextAddlabel($temp_id, $temp_title, $text, $label) { if (strlen(strstr($temp_title,$text))>0) { addLabel($temp_id, $label); } } function ifExactTextAddlabel($temp_id, $temp_title, $text, $label) { if ($temp_title == $text) { addLabel($temp_id, $label); } } function addLabel($t_noteid,$t_labelid) { //echo "adding label ".$t_labelid." to event ".$t_eventid."
"; //check for duplicates INSERT IGNORE on primary key (which is two rows) //add to database $query = "INSERT IGNORE INTO labels (note_id, label_id) VALUES ('$t_noteid','$t_labelid')"; //echo $query; mysql_query($query); } //############### END LABELS ######################### function submitContact() { $c_user = verifyInput($_POST['new_username']); $c_pass = md5(verifyInput($_POST['new_password'])); $c_fname = verifyInput($_POST['firstname']); $c_lname = verifyInput($_POST['lastname']); $c_number = verifyInput($_POST['contactnumber']); $c_email = verifyInput($_POST['email']); subscribeToTextmarks($c_number); $query = "INSERT INTO users VALUES ('',now(),'$c_user','$c_pass','$c_fname','$c_lname','$c_number','$c_email','0','0')"; mysql_query($query); } function subscribeToTextmarks($phone_number) { try { // Try to subscribe a user to a TextMark: $sMyApiKey = 'discussthing_com_8e49cd0b'; $sMyTextMarksUser = '6178880545'; // (or my TextMarks phone#) $sMyTextMarksPass = 'wizzbone'; $sKeyword = 'TOOMEY'; $sPhone = $phone_number; $tmapi = new TextMarksAPIClient_Messaging($sMyApiKey, $sMyTextMarksUser, $sMyTextMarksPass); $tmapi->subscribe($sKeyword, $sPhone); redAlert("Number successfully entered, subscription pending. You will receive a text message from 41411 soon, please reply with a \"Y\""); } catch (Exception $e) { redAlert("Subscription Error: " . $e); } } function sendToTextmark($sms_message,$phone_number) { try { // Try to send a message to a user: $sMyApiKey = 'discussthing_com_8e49cd0b'; $sMyTextMarksUser = '6178880545'; // (or my TextMarks phone#) $sMyTextMarksPass = 'wizzbone'; $sKeyword = 'TOOMEY'; $sMessage = $sms_message; $sPhone = $phone_number; $tmapi = new TextMarksAPIClient_Messaging($sMyApiKey, $sMyTextMarksUser, $sMyTextMarksPass); $tmapi->sendText($sKeyword, $sPhone, $sMessage); redAlert("Successfully sent Text Message."); } catch (Exception $e) { redAlert("Sending Error: " . $e); } } function drawFooter() { ## end mainbody_wrapper echo "
"; echo "
"; echo "Footer text"; echo "
"; } function drawRadioButtons($t_type) { addRadioToForm("notetype","0", $t_type, "Standard"); addRadioToForm("notetype","2", $t_type, "Private"); addRadioToForm("notetype","1", $t_type, "Add to email"); } function addRadioToForm($nam,$val,$t_type, $text) { echo "
"; echo $text."
"; } function retrieveRowByNotenum($notenum) { $query = "SELECT * FROM notes WHERE note_num = $notenum LIMIT 1"; echo $query; $result=mysql_query($query); $row = mysql_fetch_array($result); return $row; } function drawSettings() { echo "
"; drawMainTitle("Settings"); drawUserSettings(); echo "
"; } function drawUserSettings() { echo "
"; echo "
"; echo "User Settings"; echo "
"; drawCurrentUsers(); drawAddUserForm(); echo "
"; } /* ########## Labels Also, use label system for 'requires followup' (#!) and 'add to email' */ function strpos_all($hs_haystack, $hs_needle, $hn_offset = 0, $hn_limit = 0) { $ha_positions = array(); $hn_count = 0; while (false !== ($pos = strpos($hs_haystack, $hs_needle, $hn_offset)) && ($hn_limit == 0 || $hn_count < $hn_limit)) { $ha_positions[] = $pos; $hn_offset = $pos + strlen($hs_needle); ++$hn_count; } return $ha_positions; } function scanForLabels($t_notenum, $str) { $new_str = $str; $query = "SELECT * FROM label_names"; $result=mysql_query($query); $labelARRAY[0] = 0; $rowcounter = 0; while($row = mysql_fetch_array($result)) { $labelARRAY[$rowcounter] = $row; $rowcounter++; } // if $str contains # symbol, get location(s?) $labelPositionARRAY = strpos_all($str, '#'); //print_r($labelPositionARRAY); for ($i=count($labelPositionARRAY)-1; $i > -1; $i=$i-1) { $currpos = $labelPositionARRAY[$i]; // if next character is !, add followup label if (substr($str, $currpos+1, 1) == "!") { addLabel($t_notenum, 3-1); echo $labelARRAY[3-1]['name']."
"; $new_str = substr_replace($new_str, '', $currpos, 2); } else { // else get next three characters $abbr = substr($str, $currpos+1, 3); // check string against labels in database $labelnum = getLabelNumFromAbbr($labelARRAY, $abbr); if ($labelnum > 0) { addLabel($t_notenum, $labelnum-1); echo $labelARRAY[$labelnum-1]['name']."
"; $new_str = substr_replace($new_str, '', $currpos, 4); } else { echo "No label"; } } } // Add label to notenum // return string removing those 4 characters return $new_str; } function getLabelNumFromAbbr($t_labelARRAY, $t_abbr) { for ($k=0; $k < count($t_labelARRAY); $k++) { if ($t_labelARRAY[$k]['abbr'] == $t_abbr) { return $t_labelARRAY[$k]['id']; } } return 0; } function scanForPhoneNumbers($notenum, $str) { // if string contains ###?###?#### // can php search like that? I suspect so // add label #pho to notenum if (preg_match('/[0-9]{3}.[0-9]{3}.[0-9]{4}/', $str)) { //redAlert("Has number!"); //addLabel("#pho", $notenum) } } function scanForLinks($t_str) { $str = $t_str; $matchesarray[0] = 1; if (preg_match('/(http)(.*)/', $str, $matchesarray)) { //redAlert("Link found! ".$matchesarray[0]); $str = str_replace($matchesarray[0], "".$matchesarray[0]."",$str); } return $str; } function drawCurrentUsers() { echo "Current Users
"; $query = "SELECT * FROM users"; $result=mysql_query($query); echo ""; while($row = mysql_fetch_array($result)) { $temp_first=$row['user_firstname']; $temp_last=$row['user_lastname']; $temp_phone=$row['user_number']; $temp_email=$row['user_email']; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
NamePhone #Email
".$temp_first." ".$temp_last."".$temp_phone."".$temp_email."
"; } function drawAddUserForm() { ?>
Add New User
First Name:
Last Name:
New User Name:
New Password:
Cell Phone #:
Email Address:
"; drawMainTitle("Edit Note"); ?>
Editing Note
Subject: name="notetodo" value="1"> To Do
Note:
"; } function updateChecks() { #for loop on BOXARRAY2 #have old and new array, need to fill out new array to each blank spot is a zero $checkboxesARRAY = $_POST['BOXARRAY']; $OLDcheckboxesARRAY = $_POST['BOXARRAY2']; foreach ($OLDcheckboxesARRAY as $k => $v) { if($checkboxesARRAY[$k]) { $checkboxesARRAY[$k] = 1; } else { $checkboxesARRAY[$k] = 0; } } while (list($key, $val) = each($checkboxesARRAY)) { #echo "$key => $val\n"; #echo "UPDATE notes SET type = '".$val."' WHERE note_num = '".$key."'"; $query = "UPDATE notes SET type = '".$val."' WHERE note_num = '".$key."'"; mysql_query($query); } } function deleteNote($notenum) { $query = "UPDATE notes SET active = '0' WHERE note_num = $notenum"; mysql_query($query); } function addNote($t_subject, $t_note, $t_type, $t_todo) { # Database format: index, current date and time, subject, note, radio value $secretPass = 'kljhflk73#OO#*U$O(*Y'; $enc_subject = makeSQLsafe(Encode($t_subject,$secretPass)); $enc_note = makeSQLsafe(Encode($t_note,$secretPass)); $query = "INSERT INTO notes VALUES ('','1',now(),now(),'$enc_subject','$enc_note',$t_type,$t_todo)"; mysql_query($query); } function verifyInput($text) { $input = $text; $input = htmlspecialchars($input); if (get_magic_quotes_gpc()) { // if magic quotes is enabled, get rid of those // pesky slashes $input = stripslashes($input); } $input = mysql_real_escape_string($input); return $input; } function stripHTML($text) { return htmlspecialchars($text); } function makeSQLsafe($text) { $input = mysql_real_escape_string($text); return $input; } function Encode($data,$pwd) { $pwd_length = strlen($pwd); for ($i = 0; $i < 255; $i++) { $key[$i] = ord(substr($pwd, ($i % $pwd_length)+1, 1)); $counter[$i] = $i; } for ($i = 0; $i < 255; $i++) { $x = ($x + $counter[$i] + $key[$i]) % 256; $temp_swap = $counter[$i]; $counter[$i] = $counter[$x]; $counter[$x] = $temp_swap; } for ($i = 0; $i < strlen($data); $i++) { $a = ($a + 1) % 256; $j = ($j + $counter[$a]) % 256; $temp = $counter[$a]; $counter[$a] = $counter[$j]; $counter[$j] = $temp; $k = $counter[(($counter[$a] + $counter[$j]) % 256)]; $Zcipher = ord(substr($data, $i, 1)) ^ $k; $Zcrypt .= chr($Zcipher); } return $Zcrypt; } function hex2bin($hexdata) { for ($i=0;$i"; echo ""; echo "
"; echo "
"; echo ""; #echo ""; echo "
"; } function previewEmail(){ echo "
"; echo "Subject: "; echo buildEmailSubject(); echo "
"; echo ""; echo ""; echo "
"; echo "
"; } function getEncoded($fieldtext) { $secretPass = 'kljhflk73#OO#*U$O(*Y'; return stripHTML(Encode($fieldtext,$secretPass)); } function buildEmailBody() { $query = "SELECT * FROM notes WHERE DATE(date) = CURDATE() AND type = 1"; $result=mysql_query($query); $str = "Hi Tim,\n\n"; while($row = mysql_fetch_array($result)) { $temp_subject=getEncoded($row['subject']); $temp_note=getEncoded($row['note']); if ($temp_subject.$temp_note == "") { } else { if ($temp_subject) { $str = $str.$temp_subject."\n"; } if ($temp_note) { $str = $str.$temp_note."\n"; } $str = $str."\n"; } } return $str; } function buildEmailSubject() { return date('l').', '.date('M').'. '.date(d).' Update'; } function previewPrint() { drawTodaysDate(); $firstnote = key($_POST['BOXARRAY']); $date = getDateOfNote($firstnote); printDailyNotes($date, 1, '', ''); } function printDailyNotes($phpdate, $checkedonly, $b_ColorARRAY, $b_TitleARRAY) { $query = "SELECT * FROM notes WHERE date = '$phpdate'"; if ($checkedonly) $query = $query." AND type = 1"; $query = $query." ORDER BY note_num DESC"; $result=retrieveFromDatabase($query); while($row = mysql_fetch_array($result)) { $temp_subject=getEncoded($row['subject']); $temp_note=getEncoded($row['note']); $temp_notenum=$row['note_num']; $temp_todo=$row['todo']; if ($temp_subject.$temp_note == "") { } else { drawNote($temp_notenum,$temp_subject,$temp_note,$temp_type,$temp_todo,'','',''); } } } function getDateOfNote($notenum) { $query = "SELECT * FROM notes WHERE note_num = $notenum LIMIT 1"; $result = retrieveFromDatabase($query); $row = mysql_fetch_array($result); $date = $row['date']; return $date; } function displayOldDays($numdaysback) { echo "
"; echo "

Last ".$numdaysback." Days

"; for ($k = 1; $k < $numdaysback; $k += 1) { $query = "SELECT * FROM notes WHERE DATE(date) = DATE_SUB(CURDATE(), INTERVAL ".$k." DAY) ORDER BY note_num ASC"; $result=retrieveFromDatabase($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { $olddate = mktime(0,0,0,date("m"),date("d")-$k,date("Y")); echo "
"; echo "
"; echo date("D M j", $olddate); echo "
"; while($row = mysql_fetch_array($result)) { $temp_subject=getEncoded($row['subject']); $temp_note=getEncoded($row['note']); $temp_active=$row['active']; $temp_type=$row['type']; $temp_notenum=$row['note_num']; $temp_todo=$row['todo']; if ($temp_subject.$temp_note == "" || $temp_active == 0 ) { } else { $buttonColorARRAY = array("green", "purple", "yellow", "red"); $buttonTitleARRAY = array("Edit", "Copy to Today", "View Details", "Delete"); $buttonFunctionARRAY = array("edit", "copytotoday", "viewdetails", "delete"); drawNote($temp_notenum,$temp_subject,$temp_note,$temp_type,$temp_todo,$buttonColorARRAY, $buttonTitleARRAY, $buttonFunctionARRAY); } } echo "
"; } } echo "
"; } function drawTodaysDate() { drawMainTitle(date(l).", ".date(F)." ".date(j).date(S).", ".date(Y)); } function drawMainTitle($text) { echo "
"; echo $text; echo "
"; } function drawnoteButton($t_notenum, $color, $action, $function) { echo "
"; echo ""; echo "\"Alternative"; echo "".$action.""; echo ""; echo "
"; } function drawNote($t_notenum,$t_subject,$t_note,$t_type,$t_todo,$b_ColorARRAY, $b_TitleARRAY, $b_functionARRAY) { $note = nl2br($t_note); // this needs to be moved elsewhere ############################ // should run when record is added, but it needs a notenum... $note = scanForLabels($t_notenum, $note); $note = scanForLinks($note); scanForPhoneNumbers($t_notenum, $note); echo "
"; if ($b_ColorARRAY && $b_TitleARRAY) { echo "
"; for ($i = 0; $i < count($b_ColorARRAY); $i += 1) { drawnoteButton($t_notenum, $b_ColorARRAY[$i], $b_TitleARRAY[$i], $b_functionARRAY[$i]); } echo "
"; } if ($t_todo == 1) { echo "
"; } else { echo "
"; } if ($t_type == 2) { echo "
"; } else { echo "
"; } if ($t_subject) { echo "
"; echo $t_subject."
"; echo "
"; } if ($note) echo $note; echo "
"; echo "
"; echo "
"; } function connectAndSelectDB($un,$pw,$db) { mysql_connect("localhost",$un,$pw); @mysql_select_db($db) or die( "Unable to select database"); } ?> "; drawTodaysDate(); ?>
Add New Note
Subject: Requires Followup
Note:
"; echo "
"; echo ""; while($row = mysql_fetch_array($result)) { $temp_num=$row['note_num']; $temp_subject=getEncoded($row['subject']); $temp_note=getEncoded($row['note']); $temp_active=$row['active']; $temp_type = $row['type']; $temp_todo = $row['todo']; if ($row['type']==1) { $is_checked=" checked "; } else { $is_checked=""; } if ($temp_subject.$temp_note == "" || $temp_active == 0) { } else { echo ""; if ($temp_type==2) { echo ""; } else { echo ""; } echo ""; } } echo "
"; echo ""; $buttonColorARRAY = array('green', 'blue', 'yellow', 'red'); $buttonTitleARRAY = array('Edit', 'Send As SMS', 'View Details', 'Delete'); $buttonFunctionARRAY = array("edit", "sendsms", "viewdetails", "delete"); drawNote($temp_num,$temp_subject,$temp_note,$temp_type,$temp_todo,$buttonColorARRAY, $buttonTitleARRAY,$buttonFunctionARRAY); echo "
"; buildLetterButtons(); echo "
"; ## end currletterform div echo "
"; ## end today div echo "
"; } ?>
At Honda, that's our goldwing.Also check with the dealers viper.Your choice of an adventure travel companies.It reminds of that cool spy gadget.he police attempt to catch this motorbike.This article contains cherokee.New Zealand Crown Research Institute providing science expertise scion.Get 2002 Ford f250.Explore sites for famous and emerging fashion designers.News, vehicle information, offers,dealers, price quotes and more dodges.Wholesale prices on motorcycle parts.Current and archived reviews for jeep.We Want To Hear Your hemi.I need some info. on the functions of the ubolt www kia com.This review of the Toyota 4 runner.Company, Technology, Products, Press · welcome sebring.Most dealers are prepared to ship anywhere in the country hemi dealers.Reviews and Information on the e350.The official Web site for toyota center houston tx.Wherever you are heading: bmw service.Search for discount bmw parts.The most comprehensive classic car.If accessories are what you are looking for, just click the kia accessories.Aerodynamically designed convertible top adds very little weight to the body, one of the many reasons the miataavery 18160 template

avery 18160 template

straight consonant yaho widgets

yaho widgets

is not falsification kmd theatrics

kmd theatrics

Peirce denied tha riley brooks xvideos

riley brooks xvideos

of psychology disgusting facts about food

disgusting facts about food

is vividly portrayed beef with mixed greens chinese recipe

beef with mixed greens chinese recipe

emit light at multiple videos of how to masturbait

videos of how to masturbait

sight thin triangle cantante braulio

cantante braulio

I hate the way whats a phychiatrist

whats a phychiatrist

It's just lydia italian recipes

lydia italian recipes

given that economics kids recipes tuna

kids recipes tuna

circumstances as pictures of girls aloud in leather

pictures of girls aloud in leather

branches of the science mrs storm myfirstsexteacher

mrs storm myfirstsexteacher

that's what you children stories of poinsettia plant

children stories of poinsettia plant

character of the facts what is stisvc

what is stisvc

Typically lasers are pictures of christmas cookie and recipes

pictures of christmas cookie and recipes

a name or some small miguel yatco

miguel yatco

of composition shawnee indian weapons

shawnee indian weapons

can turn into annoyances deer hide buyers wis

deer hide buyers wis

une infante defunte motivation at kraft foods

motivation at kraft foods

dad bread charge angelic creations naperville doll hospital

angelic creations naperville doll hospital

got walk example ease recipe for happiness

recipe for happiness

of which he is brought easy recipes from peru

easy recipes from peru

mysteriously corresponded pinee oil

pinee oil

as sports medicine scientific atlanta remote explorer 3100

scientific atlanta remote explorer 3100

as what would be cooking ham in slow cooker

cooking ham in slow cooker

morning ten goldwave 5 19 serial

goldwave 5 19 serial

business of life purrfect girls cristina

purrfect girls cristina

then as Giblin halimbawa ng mga dula

halimbawa ng mga dula

element hit diversidad linguistica en mexico

diversidad linguistica en mexico

together with facts polish cake recipes

polish cake recipes

length album quotes tvcr troubleshoot

tvcr troubleshoot

in animal species 9 steps to entering parkland college

9 steps to entering parkland college

ground interest reach legend of the pulong bato

legend of the pulong bato

diagnosis and treatment plasma paid donations center

plasma paid donations center

Erik Satie’s liberian foods

liberian foods

choices in fields tillis park christmas lights

tillis park christmas lights

the idea that a belief icc incoterm 2005

icc incoterm 2005

Kafka in music micronucleus of ciliates function

micronucleus of ciliates function

ran check game smith s american sweater

smith s american sweater

Another song motivational scriptures in the bible

motivational scriptures in the bible

different ways neopets 2 0 full page guild layout tutorial

neopets 2 0 full page guild layout tutorial

the pragmatic theory houle basketball camp

houle basketball camp

of psychology skillet cube steak recipes

skillet cube steak recipes

in the mid to late trassexual women

trassexual women

She returned with 4kids tv bonus code

4kids tv bonus code

frustration and other chicken and broccoli recipes

chicken and broccoli recipes

express angst british food in the 19th century

british food in the 19th century

job edge sign roman mythology god agriculyure

roman mythology god agriculyure

become acquainted with gun safes canada

gun safes canada

in this country goose cooking time

goose cooking time

and alternative sanyo vpc s500 5 0 megapixel

sanyo vpc s500 5 0 megapixel

level chance gather drury gun san antonio tx

drury gun san antonio tx

out as Herrin milkmans bok

milkmans bok

include divide syllable felt pappagalo

pappagalo

It is no explanation myscence

myscence

clock mine tie enter golden rules for ponography

golden rules for ponography

musical composition women materbate

women materbate

contemporary connotative smoked leg of lamb recipe

smoked leg of lamb recipe

won't chair j gilbert footwear

j gilbert footwear

on the former rollie pollie ollie lyrics

rollie pollie ollie lyrics

my sister huge clite

huge clite

many direct myspac4e

myspac4e

seem to have been