Graphic Work: Ambassadors For Rebuilding
My brother is a fellow University of Akron employee and heads up the Ambassadors for Rebuilding program within the Construction Engineering Technology department. He and a bunch of able bodied and skilled students are headed to Nashville, TN this March to assist in the rebuilding of some underprivileged US veterans in the area all on a volunteer basis.
I was asked to help with a site build and some graphic work. I was asked to come up with a logo and tshirt design. Below is the logo I came up with . I made use of Adobe Illustrator CS3, messing around with it's 3D capabilities for one of the first times. Very neat stuff!
Site Work: icandothatdesign.com
My wife got a message over facebook from one of her good childhood friends that saw our photography site and inquired about my web services. She is a graphic designer in the greater Washington DC area and was looking for a way to showcase her services + build an online portfolio of her work. We made use of WordPress and a premium theme that had some portfolio management built in to it. We did a bit of code (PHP & JavaScript) and styling customization. The theme author made use of Contact Form 7 to collect contact information on a standard form on this one. SEO was achieved with Google XML Sitemaps.
As a graphic designer, it was really fun to put my own experiences to work here to help bring this one up. The work was fun and quick on this one. I look forward to the ongoing curatorship of this site.
Graphic & Site Work: iControl Automation
I am in the process of doing a s site for the folks over at iControl Automation. This is another WordPress site, making use of a premium them with some styling styling customization. We're plugging in form work with one of my favorite plugins, Contact Form 7 and SEO via Google XML Sitemaps.
They also asked for some graphical work, and we quickly (and I mean quick! 15 minutes) came up with this logo:
Standard PHP MySQL reporting
This one here is pretty simple. 3 SQL queries report out data of certain cases and mails it out.
<?
// This an email to be sent. This is the top of the email with the CSS in the head
$out ="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html>
<head>
<title>Last 24 Hours of Employee Applications Snapshot</title>
</script>
<style>
*{font-family: arial;}
.unreported, .explanation{margin: 0 0 0 10px; font-weight: normal;}
.unreported {font-size: 10px;}
.explanation {font-size: 9px; font-style: italic; color: grey;}
h4{margin: -25px 0 0 0; font-weight: normal;}
.wrapperReportLine {margin: 10px 0 0 10px; height: 60px;}
.wrapperReportLine h3, .wrapperReportLine img {float: left;}
.wrapperReportLine h3{margin: 4px 0 0 4px;}
#failedJobNoCapture {width: 400px; font-size: 12px; margin: -10px 0 0 20px;}
#failedJobNoCapture th{font-size: 15px;}
#failedJobNoCapture td{font-weight: normal; font-size: 10px;}
.dark{background-color: whitesmoke;}
.code{font-family: Courier, 'Courier New', monospace; font-weight: bold;}
ul.explanation {font-size: 13px; font-style: normal; color: black; margin: 0 0 0 0;}
ul.explanation a{font-style: italic; font-size: 10px; text-transform: uppercase; color: blue;}
ul.explanation a:hover{text-decoration: none;}
</style>
</head>
<body>
<h1>Employee Applications 24hr Snapshot</h1>
<h4>This report pulls the past 24 hours of employee applications submitted</h4>";
// db connection string
require("connst.php");
// case whre data is lacking a position number
$sql_pullFailedJobNumberCapture = "
select
b.web_form_id,
DATE_FORMAT(b.submit_date, '%c/%e/%Y %I:%i %p') as 'submit_date',
concat(a.first_name,' ',a.last_name) as 'name',
a.email
from
web_form a
inner join employee_application b
on a.web_form_id = b.web_form_id
where
RIGHT(SUBSTRING(a.custom_fields,LOCATE('|Position Number', a.custom_fields),23),6) = ''
and b.reported = 1
and a.form_type = 'Job_App'
and b.PositionNumber = ''
order by
a.web_form_id desc";
// case where data is no older than 24 hours old
$sql_pull24Hours="
SELECT
NOW() as 'now',
NOW() - INTERVAL 1 DAY as '24hrsago',
a.web_form_id,
DATE_FORMAT(a.submit_date, '%W %m/%d/%Y %r') as 'submit_date',
TIMEDIFF(now(),a.submit_date) as 'age',
concat(a.first_name,' ',a.last_name) as 'name',
concat(b.PositionNumber,' ',b.PositionTitle) as 'pos',
b.reported
FROM
web_form a
left outer join employee_application b
on a.web_form_id = b.web_form_id
WHERE
a.submit_date >= NOW() - INTERVAL 1 DAY
and a.form_type = 'Job_App'
ORDER BY
a.web_form_id desc";
// case where submit_date capture failed
$sql_pullNullRecordBottleNeckers = "
select
b.*
from
web_form b
where
b.web_form_id >= (select max(a.web_form_id) from employee_application a)
and b.form_type = 'Job_App'
and b.submit_date is null";
$result = mysql_query($sql_pull24Hours);
if (!$result)
{
echo 'Could not run pull24Hours query: ' . mysql_error();
exit;
} else {
$rowCount = mysql_num_rows($result);
$countReported = $countUnReported = $countUnMoved = 0;
$out_unReported = $outUnMoved = "";
$loopCounter = 0;
while ($row = mysql_fetch_array($result))
{
$rowClass = "";
if($loopCounter%3==0)
{
$rowClass = ($rowClass == 'dark')?'light':'dark';
}
$web_form_id = $row['web_form_id'];
$submit_date = $row['submit_date'];
$name = $row['name'];
$pos = $row['pos'];
$age = $row['age'];
$reported = $row['reported'];
$applicationDetail = $web_form_id." ".$name." ".$pos." (".$age.")";
if($reported!=1 && !$pos)
{
// just been collected data hasn't moved from wfr to ea
$countUnMoved++;
$countUnReported ++;
$out_unReported .= "<p class='unreported ".$rowClass."'>".$applicationDetail."</p>";
$outUnMoved .= "<p class='unreported ".$rowClass."'>".$applicationDetail."</p>";
} elseif ($reported!=1 && $pos) {
// moved from wfr to bu ea plugin hasn't fired
$countUnReported ++;
$out_unReported .= "<p class='unreported ".$rowClass."'>".$applicationDetail."</p>";
} elseif ($reported && $pos) {
// moved and reported
$countReported++;
}
$loopCounter++;
}
$lineHeight = 60;
if($rowCount == $countReported)
{
$out .= "<div class='wrapperReportLine'><img src='https://www.uakron.edu/casey/images/green-glossy-ball-30.jpg'><h3>".$rowCount." Applications Collected & Reported</h3></div>";
} else {
$out .= "<h3>".$rowCount." applicants' applications collected";
}
if($countUnReported>0)
{
$thisLineHeight = $lineHeight + (13.1*$countUnReported);
$out .= "<div class='wrapperReportLine' style='height: ".$thisLineHeight."px;'><img src='https://www.uakron.edu/casey/images/yellow-glossy-ball-30.jpg'><h3>".$countUnReported." Applications Unreported to Job Owners<p class='explanation'>This data has moved to HR's reporting tables, but the job owner hasn't been notified yet. The employeeApplication plugin is responsible for this one.</p>".$out_unReported."</h3></div>";
}
if($countUnMoved>0)
{
$thisLineHeight = $lineHeight + (13.1*$countUnMoved);
$out .= "<div class='wrapperReportLine' style='height: ".$thisLineHeight."px;'><img src='https://www.uakron.edu/casey/images/yellow-glossy-ball-30.jpg'><h3><p class='explanation'></p>".$countUnMoved." Applications Yet To Move<p class='explanation'>This is an application that's been submitted but hasn't been moved to HR's reporting tables and therefore unreported to the job owner as well. The plugin responsible for this one is the webFormsReporter.</p>".$outUnMoved."</h3></div>";
}
}
$result = mysql_query($sql_pullFailedJobNumberCapture);
if (!$result)
{
echo 'Could not run pullFailedJobNumberCapture query: ' . mysql_error();
exit;
} else {
$rowCount = mysql_num_rows($result);
if($rowCount > 0)
{
$out .= "<div class='wrapperReportLine'><img src='https://www.uakron.edu/casey/images/red-glossy-ball-30.jpg'><h3>Found ".$rowCount." instance(s) where job identification criteria capture failed</h3></div><table id='failedJobNoCapture' cellpadding='0' cellspacing='0'><tr><th>ID</th><th>Date</th><th>Name</th></tr>";
}
$loopCounter = 0;
while ($row = mysql_fetch_array($result))
{
if($loopCounter%3==0)
{
$rowClass = ($rowClass == 'dark')?'light':'dark';
}
$web_form_id = $row['web_form_id'];
$submit_date = $row['submit_date'];
$name = $row['name'];
$out .= "<tr class=".$rowClass."><td>".$web_form_id."</td><td>".$submit_date."</td><td>".$name."</td></tr>";
$loopCounter++;
}
$out .= "</table>";
}
/** Mon Aug 8 07:41:55 EDT 2011 - cmwise: Bottle Neckers - everytime the system goes down we see records get logged where the submit date and all custom fields are null
* record deletions are required which at this time can only be executed by a sysadmin
* by law, we're required to send these records to HR so they can keep them on file. Gonna make a reporter to quickly create a CSV to send to Laura Srpay at HR
*/
$result = mysql_query($sql_pullNullRecordBottleNeckers);
if (!$result)
{
echo 'Could not run pullNullRecordBottleNeckers query: '.mysql_error();
exit;
} else {
$rowCount = mysql_num_rows($result);
if($rowCount > 0)
{
$pluralIsAre = ($rowCount > 1)?"are":"is";
$pluralRecords = ($rowCount > 1)?"s":"";
$out .= "<div class='wrapperReportLine'><img src='https://www.uakron.edu/casey/images/red-glossy-ball-30.jpg'><h3>Found ".$rowCount." instance".$pluralRecords." where null records were created</h3></div>
<ul class='explanation'>
<li>To get the employment apps flowing again, there ".$pluralIsAre." ".$rowCount." record".$pluralRecords." to be deleted</li>
<li>By law, the WebTeam is required to remit any and all null records to HR prior to deletion<br><a href='https://www.uakron.edu/casey/exporter.php'>Create CSV to send to HR</a></li>";
$loopCounter = 0;
$theseWebFormIDs = "";
while ($row = mysql_fetch_array($result))
{
if($loopCounter%3==0)
{
$rowClass = ($rowClass == 'dark')?'light':'dark';
}
$web_form_id = $row['web_form_id'];
$theseWebFormIDs .= $web_form_id.",";
}
$out .= "<li class='code'>DELETE FROM web_form WHERE web_form_id in (".preg_replace('/,$/', '', $theseWebFormIDs).");</li></ul>";
}
}
$out.="<h2><a href='https://www.uakron.edu/casey/eap.php'>Live reporting</a></h2></body></html>";
$to = "";
$subject = "Emp App 24hr Snapshot";
$message = $out;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: Casey Sinister Wise <caseymwise@gmail.com>, Eric Kreider <ewk@uakron.edu>, Laura Chocolate-Chip-Cookie-Makin Spray <spray@uakron.edu>' . "\r\n";
$headers .= 'From: UA EmpApp 24hr Snapshot Report<noreply@uakron.edu>' . "\r\n";
$mailResult = mail($to, $subject, $message, $headers);
?>
PHP demos: iterate over XML with a MySQL recordset within
This one starts out pulling a small db record set of buildings and reading an XML doucment of people. It then iterates over the XML document. Each person in the XML is associated with a respective building abbreviation. With the building abbreviation, we iterate over the pulled database records and pull the respective building information from it and move it in to variables. All of this is then reported out as a tab seperated value text file.
<?php
$flag_debug = false;
require("connst_editorWrite.php");
$sql_pullBuildingsAndAbbreviations = "
SELECT
abbreviation,
name,
buildingID,
LAT,
LNG
FROM
campusBuildings
WHERE
active = 'Y'";
$result = mysql_query($sql_pullBuildingsAndAbbreviations);
$file = "http://server/script.cgi?key1=value1&key2=value2&key3=value3";
$xmlString = $folks = simplexml_load_file($file);
echo $xmlString;
$tab = "\t";
$cr = "\n";
$out = "ID".$tab
."Name".$tab
."Title".$tab
."Department".$tab
."Office".$tab
."Campus".$tab
."Image".$tab
."Street".$tab
."City".$tab
."State".$tab
."Postal Code".$tab
."Latlon".$tab
."Address".$tab
."Phone".$tab
."Work Phone".$tab
."Mobile Phone".$tab
."Home Phone".$tab
."Fax".$tab
."Email".$tab
."Notes".$tab
."URL".$tab
."Last Name".$cr;
$proxyArray = array(array());
foreach ($folks->entry as $entry)
{
// reset the record pointer to the top of the recordset
$ID = trim($entry['employeeID']);
$URL = "http://www.uakron.edu/search/people_detail.dot?employeeNumber=".$ID;
$Name_Last = trim($entry->lastName);
$Name_First = trim($entry->firstName);
$displayName = trim($entry->displayName);
// the reason for the breaking below is because we only want the dept and title that come out first, that's considered the "default" dept/title
foreach ($entry->department as $department)
{
$thisDept = $department['name'];
foreach ($department->title as $title)
{
$thisTitle = $title;
break;
}
break;
}
$Zip = trim($entry->zip);
$xmlPhone = trim($entry->phone);
$Phone = (empty($xmlPhone))?"":preg_replace('/^/','(',str_replace('/',')',$xmlPhone));
$Email = trim($entry->email);
$buildingRec = explode(" ",$entry->building);
$thisBuildingAbbrev = $buildingRec[0];
// Mon Jul 25 10:11:29 EDT 2011 some times there are buildings that have no room no, gotta test and make sure after the explode that there is a room
$thisRoomNo = (sizeof($buildingRec)>1)?$buildingRec[1]:"";
$thisBuildingName = $thisBuildingID = $thisLat = $thisLon = $office = $thisGeoCode ="";
while ($row = mysql_fetch_array($result))
{
$abbreviation = $row['abbreviation'];
$name = $row['name'];
$buildingID = $row['buildingID'];
$LAT = $row['LAT'];
$LNG = $row['LNG'];
if($abbreviation == $thisBuildingAbbrev)
{
$thisBuildingName = $name;
$thisBuildingID = $buildingID;
$thisLon = $LNG;
$thisLat = $LAT;
$thisGeoCode = ($LNG)?$LAT.",".$LNG:null;
$office = $thisBuildingName." ".$thisRoomNo;
break;
}
}
mysql_data_seek($result ,0);
$arrayToPush = array
(
"ID" => $ID,
"displayName" => $displayName,
"thisTitle" => $thisTitle,
"thisDept" => $thisDept,
"office" => $office,
"Campus" => "",
"Image" => "",
"Street" => "",
"City" => "",
"State" => "",
"Zip" => $Zip,
"thisGeoCode" => $thisGeoCode,
"Address" => "",
"Phone" => $Phone,
"WorkPhone" => "",
"MobilePhone" => "",
"HomePhone" => "",
"Fax" => "",
"Email" => $Email,
"Notes" => "",
"URL" => $URL,
"NameLast" => $Name_Last
);
array_push($proxyArray, $arrayToPush);
}
foreach ($proxyArray as $key => $row)
{
$NameLast[$key] = $row['NameLast'];
}
array_multisort($NameLast, SORT_ASC, $proxyArray);
$lastID = "";
for($i=1;$i<sizeof($proxyArray);$i++)
{
if($lastID != $proxyArray[$i]['ID'])
{
$out .= $proxyArray[$i]['ID'].$tab
.$proxyArray[$i]['displayName'].$tab
.$proxyArray[$i]['thisTitle'].$tab
.$proxyArray[$i]['thisDept'].$tab
.$proxyArray[$i]['office'].$tab
.$proxyArray[$i]['Campus'].$tab
.$proxyArray[$i]['Image'].$tab
.$proxyArray[$i]['Street'].$tab
.$proxyArray[$i]['City'].$tab
.$proxyArray[$i]['State'].$tab
.$proxyArray[$i]['Zip'].$tab
.$proxyArray[$i]['thisGeoCode'].$tab
.$proxyArray[$i]['Address'].$tab
.$proxyArray[$i]['Phone'].$tab
.$proxyArray[$i]['WorkPhone'].$tab
.$proxyArray[$i]['MobilePhone'].$tab
.$proxyArray[$i]['HomePhone'].$tab
.$proxyArray[$i]['Fax'].$tab
.$proxyArray[$i]['Email'].$tab
.$proxyArray[$i]['Notes'].$tab
.$proxyArray[$i]['URL'].$tab
.$proxyArray[$i]['NameLast'].$cr;
}
$lastID = $proxyArray[$i]['ID'];
}
$fileNameXLS = "PeopleDirectory.txt";
if(!$flag_debug)
{
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$fileNameXLS);
header("Pragma: no-cache");
header("Expires: 0");
}
echo $out;
?>
Rexel Mobile App Documentation
Details about the Rexel mobile app here. Made first attempt making use of the PhoneGap framework. Built originally in Android. Due to a rush to market, I hand-ported to iOS as an XCode project.
Setting GMail as default email client Xubuntu 11.04
I've abandoned machine-based email clients. So many reasons to do this, but the primary being that I spend my time on 5 different machines and I don't want to maintain 5 different email programs. I've decided that GMail is the way to go. Easy enough of a transition, I just stopped using, in my case, Mozilla Thunderbird. I now head over to gmail.com for all of my emailing needs. But what happens when I click on an email address? Typically machines are configured to open up an Outlook (or Thunderbird) email composition window when you click on an address like caseymwise@gmail.com. But my machine doesn't know about GMail, right? Not so much.
As I write this, I'm using Xubuntu 11.04. Ideally when I click on an email address, I'd like for a "mail compose" GMail window to open in the Chrome browser. I did a little snooping around and figured out how to get this done. A tip of the cap to this How To Geek article that got me pretty close. Here are the steps I took to put this in place.
- Tell Xubuntu that GMail is your default mail client
- Grab this shell script, unzip and save in your home folder (/home/your username).
- To make the script executable fire the following on the command line:
chmod u+x ~/open_mailto.sh - Click on an email address and see if you get a notification and a new GMail compose Chrome window.
- Bonus: the first line of the shell script, sends a note to the (for us Mac users out there) a growl-like desktop notification saying "GMailing <<email addres>>." If it doesn't work for you, it's available for free in the Ubuntu repositories with a quick:
sudo apt-get install libnotify-bin
- Bonus: the first line of the shell script, sends a note to the (for us Mac users out there) a growl-like desktop notification saying "GMailing <<email addres>>." If it doesn't work for you, it's available for free in the Ubuntu repositories with a quick:
Protected: ACT Learning Site
New Musical Venture
I went to Hookahville with AA Sound over memorial day weekend and had an absolute blast. I saw some incredible bands, learned all sorts of new stuff, made some new friends and stumbled upon a fellow musician with whose rhythmic styles my own resonate, my new buddy Hanger. I played mostly on cajon with him and we decided that we needed to play again. I took said cajon by his place last night in Wooster and had a whale of a time. We determined that we need to learn roughly 20-25 songs to play a 3 hour show, so currently that is our aim.
Here're the first 5 songs!
| R.D. Hanger - Spun | R.D. Hanger - Master Plan |
| R.D. Hanger - Like | R.D. Hanger - Ground Zero |
| R.D. Hanger - End of the World | |
A Sunny Day in May – Pictures of Isabel Wise
The weather this week has been amazing. Today I decided to take Baby Isabel outside on the front lawn to take some photos. My intention was to get a decent shot, something I could blow up on canvas, to give to Casey for Father's Day. I broke my secret within minutes of Casey arriving home from work to show these off. Our 8 month old green eyed beauty.





