mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
initial commit
This commit is contained in:
26
apps/atlbiomed/templates/_collapsingDivContainer.php
Executable file
26
apps/atlbiomed/templates/_collapsingDivContainer.php
Executable file
@ -0,0 +1,26 @@
|
||||
<?php use_helper('Javascript') ?>
|
||||
|
||||
<div id="<?php echo $uniqueId; ?>Header" class="collapsingPanelHeader">
|
||||
<?php echo $title; ?>
|
||||
</div>
|
||||
<div id="<?php echo $uniqueId; ?>Content" class="collapsingPanelContent">
|
||||
<?php echo $content; ?>
|
||||
</div>
|
||||
<?php
|
||||
echo javascript_tag("
|
||||
|
||||
Event.observe($('" . $uniqueId . "Header'), 'click', show" . $uniqueId . ", true);
|
||||
|
||||
var is" . $uniqueId . "Showing = 1;
|
||||
|
||||
function show" . $uniqueId . "(e)
|
||||
{
|
||||
if (is" . $uniqueId . "Showing)
|
||||
" . visual_effect('blindUp', $uniqueId . 'Content') . "
|
||||
else
|
||||
" . visual_effect('blindDown', $uniqueId . 'Content') . "
|
||||
|
||||
is" . $uniqueId . "Showing = !is" . $uniqueId . "Showing;
|
||||
}
|
||||
");
|
||||
?>
|
649
apps/atlbiomed/templates/_technicianEmailSchedule.php
Normal file
649
apps/atlbiomed/templates/_technicianEmailSchedule.php
Normal file
@ -0,0 +1,649 @@
|
||||
<?php
|
||||
/*
|
||||
* Accepts the following parameters
|
||||
* $schedule: a TechnicianSchedule object
|
||||
* $workorderCallbackFunction: a string representing a javascript function accepting 1 parameter
|
||||
*/
|
||||
|
||||
$date = explode('-',$date);
|
||||
$date = $date[1].'/'.$date[2].'/'.$date[0];
|
||||
|
||||
$tech_name = $schedule->getTechnician()->getFirstName().' '.$schedule->getTechnician()->getLastName();
|
||||
$tech_email = $schedule->getTechnician()->getEmail();
|
||||
//var_dump(get_class_methods('Workorder'));
|
||||
//exit;
|
||||
$workorders = $schedule->getWorkorders();
|
||||
$tech = $schedule->getTechnician();
|
||||
$workorders = $schedule->sortWorkorder($workorders);
|
||||
|
||||
$output = "";
|
||||
for($i=0; $i < count($workorders); $i++){
|
||||
if($workorders[$i]->getExactTime())
|
||||
$output .= "<span style='color:red'>This job starts exactly at</span>: ".$workorders[$i]->convertTime($workorders[$i]->getJobStart())."<br/>";
|
||||
else
|
||||
$output .= $workorders[$i]->convertTime($workorders[$i]->getJobStart())."<br/>";
|
||||
$output .= "<b>".$workorders[$i]->getClient()->getClientName()."</b><br/>";
|
||||
$output .= "(".$workorders[$i]->getClient()->getClientIdentification().")<br/>";
|
||||
$output .= $workorders[$i]->getClient()->getAddress() . ' ' . $workorders[$i]->getClient()->getAddress2() . ' '.
|
||||
$workorders[$i]->getClient()->getCity() .
|
||||
', '. $workorders[$i]->getClient()->getState() . ' ' . $workorders[$i]->getClient()->getZip()."<br/>";
|
||||
$output .= $workorders[$i]->getClient()->getAttn().' '.$workorders[$i]->getClient()->getPhone()."<br/>";
|
||||
$output .= "Main Contact: ".$workorders[$i]->getClient()->getAttn().' '.$workorders[$i]->getClient()->getPhone()."<br/>";
|
||||
$output .= "Requested By: ".$workorders[$i]->getCaller()."<br/>";
|
||||
$output .= "Reason: ".$job_reason[$workorders[$i]->getReason()]."<br/>Remarks:<br/>";
|
||||
$output .= $workorders[$i]->getRemarks()."<br/>";
|
||||
$output .= "<br/>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$style="<style type='text/css'>
|
||||
ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input
|
||||
{ margin: 0; padding: 0; }
|
||||
a img,:link img,:visited img { border: none; }
|
||||
|
||||
a
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover
|
||||
{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
body, td
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
font-size: 11px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.form_error, .red{
|
||||
color: #f00;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* logo, header */
|
||||
|
||||
.header
|
||||
{
|
||||
width: 93%;
|
||||
}
|
||||
|
||||
.content
|
||||
{
|
||||
width: 93%;
|
||||
}
|
||||
|
||||
.header .logo_wrapper
|
||||
{
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.secureModuleMain
|
||||
{
|
||||
text-align: center;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.secureModuleMessage
|
||||
{
|
||||
width: 600px;
|
||||
border: 1px solid black;
|
||||
text-align: left;
|
||||
background-color: #cccccc;
|
||||
color: #ffffff;
|
||||
font-size: x-large;
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.secureModuleMessage img
|
||||
{
|
||||
display: inline;
|
||||
border: 0px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.secureModuleMessage div
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.secureModuleMessage a:visited, .secureModuleMessage a:active, .secureModuleMessage a
|
||||
{
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.header .logo
|
||||
{
|
||||
padding: 5px;
|
||||
background: url(../images/logo_bg.png) #FFFFFF repeat-y;
|
||||
background-position: 100%;
|
||||
}
|
||||
|
||||
.header .menu, .header .menu a, .header .menu a:visited
|
||||
{
|
||||
margin: 0px 5px 5px 5px;
|
||||
padding: 2px 10px 2px 10px;
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
background: #08c46e;
|
||||
}
|
||||
|
||||
.menuCommands
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.loginForm
|
||||
{
|
||||
text-align: center;
|
||||
margin-top: 100px;
|
||||
}
|
||||
|
||||
.loginFormInner
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.loginFormInner fieldset
|
||||
{
|
||||
text-align: left;
|
||||
display: inline;
|
||||
position: relative;
|
||||
padding: 0 10px 10px 10px;
|
||||
}
|
||||
|
||||
.loginFormInner fieldset label
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
.loginFormInnerRow
|
||||
{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header .menu a:active
|
||||
{
|
||||
font-size: .9em;
|
||||
color: #f2080c;
|
||||
}
|
||||
|
||||
/* content */
|
||||
|
||||
/* footer */
|
||||
.footer
|
||||
{
|
||||
width: 90%;
|
||||
text-align: center;
|
||||
border-top: 2px solid #08c46e;
|
||||
margin: 20px 5px 20px 5px;
|
||||
padding: 20px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.footer a:visited
|
||||
{
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.footer a:active
|
||||
{
|
||||
color: #f2080c;
|
||||
}
|
||||
|
||||
/* ########## User Manager ########## */
|
||||
|
||||
.userForm, .currentUsers
|
||||
{
|
||||
margin-left: 5px;
|
||||
margin-bottom: 5px;
|
||||
border: 1px solid #666666;
|
||||
padding: 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.userForm
|
||||
{
|
||||
width: 255px;
|
||||
}
|
||||
|
||||
.currentUsers
|
||||
{
|
||||
|
||||
}
|
||||
/* ########## Client Manager ########## */
|
||||
.newClient
|
||||
{
|
||||
border: 1px solid #666666;
|
||||
width: 331px;
|
||||
margin: 0 5px 5px 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.clientSelect
|
||||
{
|
||||
padding: 3px;
|
||||
background: #ccc;
|
||||
border-bottom: 1px solid #666666;
|
||||
}
|
||||
|
||||
.clientSelect td
|
||||
{
|
||||
background: #DDDDDD;
|
||||
}
|
||||
.clientHeader
|
||||
{
|
||||
clear: both;
|
||||
width: 100%;
|
||||
padding: 3px 0px;
|
||||
background: #ccc;
|
||||
border-top: 1px solid #666666;
|
||||
border-bottom: 1px solid #666666;
|
||||
}
|
||||
.clientHeader h2
|
||||
{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.oldWorkorders td, .upWorkorders td{
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
.clientSelect td
|
||||
{
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
.clientInfo
|
||||
{
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.clientDevice
|
||||
{
|
||||
width: 776px;
|
||||
border: 1px solid #666666;
|
||||
padding: 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#clientOptions input
|
||||
{
|
||||
float: right;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
/* ########## Workorders ########## */
|
||||
|
||||
#workorder_report
|
||||
{
|
||||
border: 1px solid #888888;
|
||||
}
|
||||
|
||||
#workorder_report td
|
||||
{
|
||||
background: #6292c4;
|
||||
padding: 3px;
|
||||
margin: 1px;
|
||||
}
|
||||
#workorder_report td.order_label
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* ########## Scheduler ########## */
|
||||
#main
|
||||
{
|
||||
width: 90%;
|
||||
|
||||
margin: 0 5px 0 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#availableTechWrapper
|
||||
{
|
||||
}
|
||||
#availableTechnicians
|
||||
{
|
||||
border: 1px solid #000;
|
||||
width: 200px;
|
||||
float: left;
|
||||
margin: 5px 5px 5px 0;
|
||||
}
|
||||
#availableTechnicians h2
|
||||
{
|
||||
font-size: 14px;
|
||||
background: #ccc;
|
||||
border-bottom: 1px solid #000;
|
||||
padding: 5px;
|
||||
line-height: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
#availableTechs{
|
||||
padding: 10px;
|
||||
}
|
||||
#availableTechs div.availTech{
|
||||
padding-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#availableTechs div.availTech a{
|
||||
font-weight: normal;
|
||||
color: #00f;
|
||||
}
|
||||
#scheduler
|
||||
{
|
||||
width: 350px;
|
||||
margin: 5px;
|
||||
border: 1px solid #000;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#scheduler .client_select
|
||||
{
|
||||
background-color: #ccc;
|
||||
border-bottom: 1px solid #666666;
|
||||
padding: 5px;
|
||||
}
|
||||
#scheduler .client_select td
|
||||
{
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
vertical-alignt: middle;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
#scheduler .job_details
|
||||
{
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#scheduler table tr td
|
||||
{
|
||||
background-color: transparent;
|
||||
}
|
||||
#scheduler small{
|
||||
font-size: 11px;
|
||||
padding: 3px 2px;
|
||||
}
|
||||
#display
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
.techSchedule div
|
||||
{
|
||||
width: 200px;
|
||||
float: left;
|
||||
}
|
||||
#techInfo{
|
||||
width: 1100px;
|
||||
}
|
||||
#techMenu
|
||||
{
|
||||
clear: both;
|
||||
background: #ccc;
|
||||
padding: 5px 0px;
|
||||
border: 1px solid #000;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#techMenu a{
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
border-right: 1px solid #000;
|
||||
padding: 5px 7px;
|
||||
}
|
||||
#techMenu a:hover{
|
||||
text-decoration: none;
|
||||
background: #ddd;
|
||||
}
|
||||
#techMap
|
||||
{
|
||||
width: 575px;
|
||||
height: 450px;
|
||||
float: right;
|
||||
margin-right: 50px;
|
||||
}
|
||||
#techMapDisplay
|
||||
{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
div .techTableWrapper
|
||||
{
|
||||
float: left;
|
||||
margin: 10px;
|
||||
position: relative;
|
||||
display: inline:
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
div .techTable
|
||||
{
|
||||
border: 1px solid #000;
|
||||
}
|
||||
div.techSchedule{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.techSchedule div.tech-name{
|
||||
background: #ccc;
|
||||
padding: 5px;
|
||||
border-top: 1px solid #000;
|
||||
border-left: 1px solid #000;
|
||||
border-right: 1px solid #000;
|
||||
width: 190px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.techSchedule div .scheduled
|
||||
{
|
||||
background: #4aa7be;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.techSchedule div .scheduled-existing
|
||||
{
|
||||
}
|
||||
|
||||
.techSchedule div .scheduled-new
|
||||
{
|
||||
border-top: 1px solid #000000;
|
||||
}
|
||||
|
||||
.techSchedule div .unscheduled
|
||||
{
|
||||
}
|
||||
|
||||
.techSchedule div .unscheduledJobEnd
|
||||
{
|
||||
border-top: 1px solid #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
.techSchedule div div
|
||||
{
|
||||
float: none;
|
||||
}
|
||||
|
||||
.techSchedule table
|
||||
{
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
.techSchedule td
|
||||
{
|
||||
padding: 3px;
|
||||
margin: 0px;
|
||||
background: #4aa7be;
|
||||
}
|
||||
.techSchedule div.unscheduled td.un-spacer
|
||||
{
|
||||
border-bottom: 1px dotted #000000;
|
||||
background: #fff;
|
||||
}
|
||||
.techSchedule td.time
|
||||
{
|
||||
vertical-align: top;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
width: 30px;
|
||||
background: #ddd;
|
||||
border-right: 1px solid #000;
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
.techSchedule div.scheduled td.time
|
||||
{
|
||||
background: #ddd;
|
||||
}
|
||||
.techSchedule td.schedule-client{
|
||||
padding-left: 5px;
|
||||
}
|
||||
{
|
||||
vertical-align: top;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mapsCollapsingPanelContainer
|
||||
{
|
||||
float: left;
|
||||
width: 200px;
|
||||
border: 1px solid black;
|
||||
text-align: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.mapsCollapsingPanelContainer select
|
||||
{
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.mapsCollapsingPanelContainerControl
|
||||
{
|
||||
width: 95%;
|
||||
height: 25px;
|
||||
padding: 10px 0px 0px 5px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.collapsingPanelHeader
|
||||
{
|
||||
background-color: #ccc;
|
||||
width: 95%;
|
||||
height: 25px;
|
||||
padding: 10px 0px 0px 5px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 5px;
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
border: 1px solid black;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.collapsingPanelContent
|
||||
{
|
||||
width: 95%;
|
||||
min-height: 25px;
|
||||
padding: 10px 0px 0px 5px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border-width: 0px 1px 1px 1px;
|
||||
border-style: solid;
|
||||
text-align: left;
|
||||
}
|
||||
.form-error{
|
||||
font-weight: bold;
|
||||
color: #f00;
|
||||
}
|
||||
.workorder_search_results td{
|
||||
padding: 2px 5px;
|
||||
}
|
||||
</style>";
|
||||
|
||||
|
||||
$messsage = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">'."<html><head><title> $tech_name's Schedule</title>".
|
||||
"<link rel='stylesheet' type='text/css' media='screen' href='http://staging.atlanticbiomedical.accella.net/css/main.css'/>".
|
||||
"$style</head><body>Comments: <br/>$emailComment <br/><br/><div class='techSchedule' style='font-size: 12px;'>".
|
||||
"$output</div></body></html>";
|
||||
|
||||
|
||||
|
||||
//$tech_email = "starkisspk@yahoo.com";
|
||||
//$tech_email = "jaking17@gmail.com";
|
||||
//$tech_email = "accellatest@gmail.com";
|
||||
//$tech_email = "csewell2008@gmail.com";
|
||||
|
||||
$headers = 'MIME-Version: 1.0' . "\n";
|
||||
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
|
||||
$headers .= 'From: Atlantic Biomedical <schedule@atlanticbiomedical.com>' . "\n";
|
||||
file_put_contents('/home/ryan/sites/accella/abc/web/t/email.html',$messsage);
|
||||
if( !empty($tech_name) and !empty($tech_email) )
|
||||
{
|
||||
|
||||
|
||||
/***************************************/
|
||||
$mail=new PHPMailer();
|
||||
|
||||
$mail->IsSMTP();
|
||||
$mail->SMTPAuth = true; // enable SMTP authentication
|
||||
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
|
||||
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
|
||||
$mail->Port = 465; // set the SMTP port
|
||||
$mail->Username = "schedule@atlanticbiomedical.com"; // GMAIL username
|
||||
$mail->Password = "success4"; // GMAIL password
|
||||
|
||||
$mail->From = "schedule@atlanticbiomedical.com";
|
||||
$mail->FromName = "AtlanticBiomedical Schedule";
|
||||
$mail->Subject = "$tech_name's Atlantic Biomedical Schedule " . $date;
|
||||
$mail->Body = $messsage; //HTML Body
|
||||
$mail->AltBody = "HTML IS REQUIRED TO VIEW"; //Text Body
|
||||
|
||||
$mail->WordWrap = 50; // set word wrap
|
||||
$mail->AddAddress("$tech_email","$tech_name");
|
||||
$mail->AddReplyTo("schedule@atlanticbiomedical.com","Schedules");
|
||||
$mail->AddCC("chris.endres@gmail.com","Chris Endres");
|
||||
//$mail->AddAttachment("/path/to/file.zip"); // attachment
|
||||
//$mail->AddAttachment("/path/to/image.jpg", "new.jpg"); // attachment
|
||||
$result = $mail->Send();
|
||||
/***************************************/
|
||||
|
||||
if(!$result){
|
||||
|
||||
echo "<b><span class='tech_email_error'>ERROR</span></b><br/> Unable to Email<br/>";
|
||||
echo "<b>Email: </b><br/> $tech_email<br/>";
|
||||
echo "<b>TechName: </b><br/> $tech_name<br/>";
|
||||
}else
|
||||
echo "Email was sent to<br/> <b>$tech_name</b> at<br/> <b>$tech_email</b><br/>";
|
||||
|
||||
}elseif(empty($tech_name)){
|
||||
echo "<b><span class='tech_email_error'>ERROR</span></b><br/> Unknown Tech<br/>";
|
||||
echo "<b>Email: </b><br/> $tech_email<br/>";
|
||||
}
|
||||
else{
|
||||
echo "<b><span class='tech_email_error'>ERROR</span></b><br/> No Tech Email<br/>";
|
||||
echo "<b>TechName: </b><br/> $tech_name<br/>";
|
||||
}
|
||||
echo "<input class='emailButton' id='close_butt_ajax' type='button' value='close' onclick='Element.hide(\"emailPopUp\")'>";
|
||||
|
||||
|
||||
?>
|
||||
|
129
apps/atlbiomed/templates/_technicianSchedule.php
Executable file
129
apps/atlbiomed/templates/_technicianSchedule.php
Executable file
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
/*
|
||||
* Accepts the following parameters
|
||||
* $schedule: a TechnicianSchedule object
|
||||
* $workorderCallbackFunction: a string representing a javascript function accepting 1 parameter
|
||||
*/
|
||||
?>
|
||||
<div class="techTableWrapper">
|
||||
<div class="tech-name" id="techSchedule_color_<?php echo $schedule->getTechnician ()->getId();?>"><?php $tech_name = $schedule->getTechnician ()->getFirstName () . ' ' . $schedule->getTechnician ()->getLastName ();
|
||||
echo $schedule->getTechnician ()->getFirstName () . ' ' . $schedule->getTechnician ()->getLastName ();
|
||||
?> | <a href='javascript:void(0);' onclick='show_popup2(event ,"<?php echo $schedule->getTechnician ()->getId(); ?>","<?php echo $tech_name; ?>","emailPopUp");'>Send
|
||||
Email</a></div>
|
||||
<div id="techSchedule_<?php echo $schedule->getTechnician ()->getId (); ?>" class="techTable">
|
||||
<?php
|
||||
|
||||
$start = $schedule->getTechnician ()->getStartTime ();
|
||||
$previousOrder = null;
|
||||
while ( $start < $schedule->getTechnician ()->getEndTime () ) {
|
||||
|
||||
$order = $schedule->getWorkorderAtTime ( $start );
|
||||
|
||||
|
||||
//convert to standard hours 8:00am, 3:30pm etc
|
||||
$h = substr ( $start, 0, 2 );
|
||||
$hh = substr ( $start, 0, 1 );
|
||||
$m = substr ( $start, 2, 2 );
|
||||
|
||||
if ($hh == '0') {
|
||||
$hour = substr ( $start, 1, 1 );
|
||||
}
|
||||
if ($hh != '0' && $h < 13) {
|
||||
$hour = $h;
|
||||
}
|
||||
if ($h > 12) {
|
||||
$hour = $h - 12;
|
||||
}
|
||||
$time = $hour . ':' . $m;
|
||||
if($order!=null){
|
||||
}
|
||||
if ($order == null) {
|
||||
// no job is schedule for this hour
|
||||
//display empty hour
|
||||
?>
|
||||
<div class="unscheduled">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="time"><?php
|
||||
echo $time;
|
||||
?></td>
|
||||
<td class="un-spacer"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
$content = '<td class="time" align="right">' . $time . '</td>';
|
||||
$cssClazz = 'scheduled';
|
||||
if (($previousOrder != null && $previousOrder->getId () != $order->getId ()) || $previousOrder == null) {
|
||||
//print_r(get_class($order));
|
||||
$job_start = $order->getJobStart ();
|
||||
$job_end = $order->getJobEnd ();
|
||||
|
||||
if($order->getJobStatusId() == 7)
|
||||
$newBg = "Style = 'background-color: red'";
|
||||
elseif($order->getExactTime())
|
||||
$newBg = "Style = 'background-color: #0099FF'";
|
||||
else
|
||||
$newBg = "";
|
||||
|
||||
//just in case this client was deleted from the DB we create an empty client to avoid an error
|
||||
|
||||
if($order->getClient())
|
||||
$c_address = $order->getClient ()->getAddress () . ' ' . $order->getClient ()->getCity () . ' ' . $order->getClient ()->getState (). ' '.$order->getClient ()->getZip ()."<br/>";
|
||||
|
||||
if(!$order->getClient())
|
||||
$content = "<div>THE CLIENT THIS JOB WAS SCHEDULED FOR NO LONGER EXIST</div>";
|
||||
else
|
||||
$content .= '<td class="schedule-client" '.$newBg.'><b> '. $order->convertTime($job_start) .'-'.$order->convertTime($job_end).'<br/>'. $order->getClient ()->getClientName () . '</b><br/>(' . $order->getClient ()->getClientIdentification () . ') <br/>' . $order->getClient ()->getCity () . ', ' . $order->getClient ()->getState () . '<br/><br/>Assigned By: '.$order->getAssignerName(). $c_address.'</td>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ($previousOrder != null && $previousOrder->getId () != $order->getId ()) {
|
||||
$cssClazz = $cssClazz . ' scheduled-new';
|
||||
} else {
|
||||
$cssClazz = $cssClazz . ' scheduled-existing';
|
||||
if ($previousOrder != null) {
|
||||
$content .= '<td class="schedule-spacer" '.$newBg.'> </td>';
|
||||
}
|
||||
}
|
||||
|
||||
$previousOrder = $order;
|
||||
|
||||
$callback = '';
|
||||
if (isset ( $workorderCallbackFunction ))
|
||||
$callback = $workorderCallbackFunction . '(' . $order->getId () . ')'?>
|
||||
<div class="<?php
|
||||
echo $cssClazz;
|
||||
?>"
|
||||
onclick="<?php
|
||||
echo $callback;
|
||||
?>" <?php ?>>
|
||||
<table>
|
||||
<tr>
|
||||
<?php
|
||||
//print schedule row for hour with schedule
|
||||
echo $content;
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
// increment time
|
||||
if (substr ( $start, 2, 2 ) == '30') {
|
||||
$start = abs ( substr ( $start, 0, 2 ) ) + 1 . '00';
|
||||
|
||||
if (strlen ( $start ) != 4) {
|
||||
$start = '0' . $start;
|
||||
}
|
||||
} else {
|
||||
$start = substr ( $start, 0, 2 ) . '30';
|
||||
}
|
||||
} //while
|
||||
?>
|
||||
</div>
|
||||
</div>
|
52
apps/atlbiomed/templates/layout.php
Normal file
52
apps/atlbiomed/templates/layout.php
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<head>
|
||||
|
||||
<?php include_http_metas() ?>
|
||||
<?php include_metas() ?>
|
||||
|
||||
<?php include_title() ?>
|
||||
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<div class="logo_wrapper">
|
||||
<div class="logo">
|
||||
<?php echo image_tag('logo.png'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="menuCommands">
|
||||
<?php echo link_to('Scheduler', 'scheduler/index'); ?> |
|
||||
<?php echo link_to('Workorders', 'workOrder/index'); ?> |
|
||||
<?php echo link_to('Maps', 'maps/index'); ?> |
|
||||
<?php echo link_to('Clients', 'clientManager/index'); ?> |
|
||||
<?php echo link_to('Users', 'userManager/index'); ?> |
|
||||
<?php echo link_to('Messages', "messages/index"); ?> |
|
||||
<a href="http://accella.unfuddle.com/" target="_blank">Support</a> |
|
||||
<?php echo link_to('Process', "process/index"); ?> |
|
||||
<a href='https://mail.google.com/a/atlanticbiomedical.com' target='_blank'> Email </a> |
|
||||
<?php echo link_to('Logout', 'security/logout'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="content"> -->
|
||||
<?php echo $sf_data->getRaw('sf_content') ?>
|
||||
<!-- </div> -->
|
||||
|
||||
<div class="footer">
|
||||
|
||||
<?php echo link_to('Scheduler', 'scheduler/index'); ?> |
|
||||
<?php echo link_to('Workorders', 'workOrder/index'); ?> |
|
||||
<?php echo link_to('Maps', 'maps/index'); ?> |
|
||||
<?php echo link_to('Clients', 'clientManager/index'); ?> |
|
||||
<?php echo link_to('Users', 'userManager/index'); ?> |
|
||||
<?php echo link_to('Messages', 'http://abc.accella.net/messages/index.html'); ?> |
|
||||
<?php echo link_to('Support', 'http://www.ciphent.com/bugtracker'); ?> <br/><br/>
|
||||
© Copyright Atlantic Biomedical 2007
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
27
apps/atlbiomed/templates/noLayout.php
Executable file
27
apps/atlbiomed/templates/noLayout.php
Executable file
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<head>
|
||||
|
||||
<?php include_http_metas() ?>
|
||||
<?php include_metas() ?>
|
||||
|
||||
<?php include_title() ?>
|
||||
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<div class="logo_wrapper">
|
||||
<div class="logo">
|
||||
<?php echo image_tag('logo.png'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="content"> -->
|
||||
<?php echo $sf_data->getRaw('sf_content') ?>
|
||||
<!-- </div> -->
|
||||
|
||||
</body>
|
||||
</html>
|
14
apps/atlbiomed/templates/techMap.php
Executable file
14
apps/atlbiomed/templates/techMap.php
Executable file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<head>
|
||||
|
||||
<?php include_http_metas() ?>
|
||||
<?php include_metas() ?>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- <div class="content"> -->
|
||||
<?php echo $sf_data->getRaw('sf_content') ?>
|
||||
<!-- </div> -->
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user