require_once 'app_code/class.Event_Contacts.php'; require_once 'class/class.note.php'; require_once 'class/class.tasks.php'; require_once 'app_code/global.config.php'; require_once 'app_code/class.CertificationType.php'; require_once 'app_code/class.application.php'; require_once 'app_code/class.Event.php'; require_once 'class/class.securenote.php'; require_once 'class/class.cases.php'; $secure = new secure(); if (PHONE_SYSTEM == "asterisk") { require_once 'class/class.asterisk.php'; $asterisk = new Asterisk(); } $contact_id = $vars['contact_id']; $em = new Event_Contacts(); $em->SetContactID($contact_id); $contact = new Contacts(); $evt = new Event(); $page = new basic_page(); $note = new Note(); $task = new Tasks(); $notify = new Notification(); $cases = new cases(); $cert = new Certification_Type(); $app = new Application(); $dynamic_page = new dynamic_page(); $global_tasks = new GlobalTask(); ?> <table style="width: 100%"><tr><td style="width:70%;vertical-align: top;padding-right: 20px;" > <div id="div_credential" class="" style="display:none;"></div>
} $page = new basic_page(); $page->auth->Checklogin(); if ($_REQUEST[contact_id] == '') { $page->gotoPage('contacts.php'); exit; } /* if( $page->auth->checkPermessionView('TBL_CONTACT',$_REQUEST[contact_id])==0 and $page->auth->isOwner(TBL_CONTACT," and contact_id='$_REQUEST[contact_id]'")==0) { $page->auth->SendToRefrerPage(); exit(); } */ $em = new Event_Contacts(); $contact = new Contacts(); $ajax = new PHPLiveX(); $evt = new Event(); $note = new Note(); $notify = new Notification(); $cert = new Certification_Type(); $app = new Application(); /******************** Contact Object ***********************/ $em->SetUserID($page->auth->Get_user_id()); $em->SetContactID($_REQUEST[contact_id]); $em->SetUserName($page->auth->Get_user_name()); $_SESSION['contact_id'] = $em->GetContactID(); /*********************************************************/ /******************** Task Object ***********************/ $user = new User();
<?php require_once 'app_code/config.inc.php'; require_once 'class/class.contacts.php'; require_once 'app_code/zipcode.class.php'; require_once 'app_code/class.Event_Contacts.php'; require_once 'class/class.note.php'; require_once 'class/class.tasks.php'; require_once 'app_code/global.config.php'; require_once 'app_code/class.CertificationType.php'; require_once 'app_code/class.application.php'; require_once 'app_code/class.Event.php'; require_once 'class/class.securenote.php'; $secure = new secure(); if (PHONE_SYSTEM == "asterisk") { require_once 'class/class.asterisk.php'; $asterisk = new Asterisk(); } $contact_id = $vars['contact_id']; $em = new Event_Contacts(); $em->SetContactID($contact_id); $contact = new Contacts(); $evt = new Event(); $page = new basic_page(); $note = new Note(); $task = new Tasks(); $notify = new Notification(); $cert = new Certification_Type(); $app = new Application(); $dynamic_page = new dynamic_page(); $em->addContactsInCompany('server', 'em', $contact_id);
function EditResume($runat, $contact_id) { $this->cont_id = $contact_id; $this->contact_id = $contact_id; $FormName = 'editresume'; switch ($runat) { case 'local': $sql_contact = "select * from " . TBL_CONTACT . " where contact_id='" . $this->cont_id . "'"; $result_contact = $this->db->query($sql_contact, __FILE__, __LINE__); $row_contact = $this->db->fetch_array($result_contact); $sql_app_general = "select * from " . EM_APPLICATION_GENERAL . " where contact_id='" . $this->cont_id . "'"; $result_app_general = $this->db->query($sql_app_general, __FILE__, __LINE__); $row_app_general = $this->db->fetch_array($result_app_general); if ($this->db->num_rows($result_app_general) <= 0) { $insert_sql_array = array(); $insert_sql_array[contact_id] = $this->cont_id; $this->db->insert(EM_APPLICATION_GENERAL, $insert_sql_array); } $sql_address = "select * from " . CONTACT_ADDRESS . " where contact_id='" . $this->cont_id . "'"; $result_address = $this->db->query($sql_address, __FILE__, __LINE__); $row_address = $this->db->fetch_array($result_address); $sql_education_hs = "select * from " . EM_APPLICATION_EDUCATION . " where contact_id='" . $this->cont_id . "' and title='High School'"; $result_education_hs = $this->db->query($sql_education_hs, __FILE__, __LINE__); $row_education_hs = $this->db->fetch_array($result_education_hs); if ($this->db->num_rows($result_education_hs) <= 0) { $insert_sql_array = array(); $insert_sql_array[contact_id] = $this->cont_id; $this->db->insert(EM_APPLICATION_EDUCATION, $insert_sql_array); } $sql_education_col = "select * from " . EM_APPLICATION_EDUCATION . " where contact_id='" . $this->cont_id . "' and title='College'"; $result_education_col = $this->db->query($sql_education_col, __FILE__, __LINE__); $row_education_col = $this->db->fetch_array($result_education_col); $sql_education_othr = "select * from " . EM_APPLICATION_EDUCATION . " where contact_id='" . $this->cont_id . "' and title='Other'"; $result_education_othr = $this->db->query($sql_education_othr, __FILE__, __LINE__); $row_education_othr = $this->db->fetch_array($result_education_othr); $sql_references = "select * from " . EM_APPLICATION_REFERENCES . " where contact_id='" . $this->cont_id . "'"; $result_references = $this->db->query($sql_references, __FILE__, __LINE__); if ($this->db->num_rows($result_references) <= 0) { $insert_sql_array = array(); $insert_sql_array[contact_id] = $this->cont_id; $this->db->insert(EM_APPLICATION_REFERENCES, $insert_sql_array); } $sql_prev_employment = "select * from " . EM_APPLICATION_PREVIOUS_EMPLOYMENT . " where contact_id='" . $this->cont_id . "'"; $result_prev_employment = $this->db->query($sql_prev_employment, __FILE__, __LINE__); if ($this->db->num_rows($result_prev_employment) <= 0) { $insert_sql_array = array(); $insert_sql_array[contact_id] = $this->cont_id; $this->db->insert(EM_APPLICATION_PREVIOUS_EMPLOYMENT, $insert_sql_array); } $sql_military = "select * from " . EM_APPLICATION_MILITARY_SERVICE . " where contact_id='" . $this->cont_id . "'"; $result_military = $this->db->query($sql_military, __FILE__, __LINE__); $row_military = $this->db->fetch_array($result_military); if ($this->db->num_rows($result_military) <= 0) { $insert_sql_array = array(); $insert_sql_array[contact_id] = $this->cont_id; $this->db->insert(EM_APPLICATION_MILITARY_SERVICE, $insert_sql_array); } //create client side validation $formName = 'frmRegistration'; $ControlNames = array("first_name" => array('first_name', "''", "Required !!", "spanfirst_name"), "last_name" => array('last_name', "''", "Required !!", "spanlast_name"), "street_address" => array('street_address', "''", "Required !!", "spanstreet_address"), "city" => array('city', "''", "Required !!", "spancity"), "zip" => array('zip', "''", "Required !!", "spanzip"), "position_applied" => array('position_applied', "''", "Required !!", "spanposition_applied"), "signature" => array('signature', "''", "Required !!", "spansignature")); $this->ValidationFunctionName = "frmRegistration_CheckValidity"; $JsCodeForFormValidation = $this->Validity->ShowJSFormValidationCode($formName, $ControlNames, $this->ValidationFunctionName, $SameFields, $ErrorMsgForSameFields); echo $JsCodeForFormValidation; ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?> ?contact_id=<?php echo $this->cont_id; ?> &index=Edit" method="post" name="frmRegistration" id="frmRegistration" > <input type="hidden" name="setform" value="set"/> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><?php $em = new Event_Contacts(); ?> <div class="data_box"> <?php echo $em->GetContactProfile($this->cont_id); ?> </div> </td> </tr> <tr> <td align="left" valign="top"><?php if ($error) { $this->Form->ErrorString .= $error; echo $this->Form->ErrtxtPrefix . $this->Form->ErrorString . $this->Form->ErrtxtSufix; } ?> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1"> <tr> <td height="25" align="left" valign="middle" class="login">APPLICANT INFORMATION</td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="top" class="text1">Last Name </td> <td align="left" valign="top"> <input name="last_name" id="last_name" value="<?php echo $row_contact['last_name']; ?> " type="text" class="textbox1" /> <span id="spanlast_name" class="normal"> </span> </td> </tr> </table> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="top" class="text1">First Name </td> <td align="left" valign="top"> <input name="first_name" id="first_name" value="<?php echo $row_contact['first_name']; ?> " type="text" class="textbox1" /> <span id="spanfirst_name" class="normal"> </span> </td> </tr> </table> </td> <td align="left" valign="top" class="text1">M. I.</td> <td align="left" valign="top"> <input type="text" name="middle_name" id="middle_name" value="<?php echo $row_app_general['mi']; ?> " class="textbox2" /></td> <td align="left" valign="top" class="text1"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top">Date <input type="text" name="date_posted" id="date_posted" class="date" readonly="readonly" value="<?php echo $row_app_general['date']; ?> " /></td> <td><img src="../images/b_calendar.png" id='button1' onMouseOver="javascript:document.body.style.cursor='hand';" onMouseOut="javascript:document.body.style.cursor='default';"> <span id="spandate_posted" class="normal"> </span></td> </tr> </table> <script language="javascript" type="text/javascript"> var startDate; var endDate; function resetDates() { startDate = endDate = null; } function filterDates1(cal) { startDate = new Date(cal.date) startDate.setHours(0,0,0,0) // used for compares without TIME if (endDate == null) { Zapatec.Calendar.setup({ inputField : "date_posted", button : "button1", // What will trigger the popup of the calendar ifFormat : "%m-%d-%Y", date : cal.date, showsTime : false, //no time dateStatusFunc : disallowDateBefore, //the function to call onUpdate : filterDates2 }); } } function filterDates2(cal) { var date = cal.date; endDate = new Date(cal.date) endDate.setHours(0,0,0,0) // used for compares without TIME } function disallowDateBefore(dateCheckOut) { dateCheckOut.setHours(0,0,0,0) if ((startDate != null) && startDate > dateCheckOut) // startDate is defined, make sure cal date is NOT before start date return true; var now = new Date() now.setHours(0,0,0,0) if (dateCheckOut < now) // check out date can not be befor today if startDate NOT defined return true; return false; } function disallowDateAfter(dateCheckIn) { dateCheckIn.setHours(0,0,0,0) if ((endDate != null) && dateCheckIn > endDate) // endDate defined, calendar date can NOT be after endDate return true; var now = new Date() now.setHours(0,0,0,0) if (dateCheckIn < now) // endDate NOT defined, calendar date can not be before today return true; return false; } // end hiding contents from old browsers --> </script> <script type="text/javascript"> var cal = new Zapatec.Calendar.setup({ inputField : "date_posted", // id of the input field button : "button1", // What will trigger the popup of the calendar ifFormat : "%m-%d-%Y", // format of the input field: Mar 18, 2005 showsTime : false, //no time dateStatusFunc : disallowDateAfter, //the function to call onUpdate : filterDates1 }); </script> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="top" class="text1">Street Address </td> <td align="left" valign="top"> <input name="street_address" id="street_address" value="<?php echo $row_address['street_address']; ?> " type="text" class="textbox4" /> <span id="spanstreet_address" class="normal"> </span> </td> </tr> </table> </td> <td align="left" valign="top" class="text1">Apartment/Unit # <input type="text" name="apartment_no" id="apartment_no" value="<?php echo $row_app_general['apartment']; ?> " class="textbox3" /> <span id="spanapartment_no" class="normal"> </span></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="top" class="text1">City</td> <td align="left" valign="top"> <input name="city" id="city" value="<?php echo $row_address['city']; ?> " type="text" class="textbox1" /> <span id="spancity" class="normal"> </span> </td> </tr> </table> </td> <td align="left" valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100" height="30" align="left" valign="top" class="text1">State</td> <td width="200" align="left" valign="top"> <select style="width:auto" name="state" id="state" class="dropdownlist1"> <option value="">Select State</option> <?php $state = file("state_us.inc"); foreach ($state as $val) { $state = trim($val); ?> <option <?php if ($row_address['state'] == $state) { echo 'selected="selected"'; } ?> value="<?php echo $state; ?> "><?php echo $state; ?> </option> <?php } ?> </select> <span id="spanstate" class="normal"> </span> </td> </tr> </table> </td> <td align="left" valign="top" class="text1">Zip Code <input name="zip" id="zip" value="<?php echo $row_address['zip']; ?> " type="text" class="textbox5" /> <br /> <span id="spanzip" class="normal"> </span></td> <td align="left" valign="middle"> </td> </tr> </table> </td> </tr> <tr> <td> <!--<table class="table">--> <?php //$this->contact->contact_id = $this->cont_id; //$this->contact->EditContactPhone('local'); ?> <?php //$this->contact->EditContactEmail('local'); ?> <?php ///$this->contact->EditContactIm('local'); ?> <?php //$this->contact->EditContactWebsite('local'); ?> <?php //$this->contact->EditContactTwitter('local'); ?> <!--</table>--></td></tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1"></td> <td align="left" valign="middle"> <span id="spanphone" class="normal"> </span> </td> </tr> </table> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1"></td> <td align="left" valign="middle"> <span id="spanemail" class="normal"> </span> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1">Date Available</td> <td align="left" valign="middle"> <input name="date_available" id="date_available" type="text" value="<?php echo $row_app_general['date_available']; ?> " class="date_available" readonly="readonly" /> <img src="../images/b_calendar.png" id='button2' onMouseOver="javascript:document.body.style.cursor='hand';" onMouseOut="javascript:document.body.style.cursor='default';"> <span id="spandate_available" class="normal"> </span> <script language="javascript" type="text/javascript"> var startDate; var endDate; function resetDates() { startDate = endDate = null; } function filterDates1(cal) { startDate = new Date(cal.date) startDate.setHours(0,0,0,0) // used for compares without TIME if (endDate == null) { Zapatec.Calendar.setup({ inputField : "date_available", button : "button2", // What will trigger the popup of the calendar ifFormat : "%m-%d-%Y", date : cal.date, showsTime : false, //no time dateStatusFunc : disallowDateBefore, //the function to call onUpdate : filterDates2 }); } } function filterDates2(cal) { var date = cal.date; endDate = new Date(cal.date) endDate.setHours(0,0,0,0) // used for compares without TIME } function disallowDateBefore(dateCheckOut) { dateCheckOut.setHours(0,0,0,0) if ((startDate != null) && startDate > dateCheckOut) // startDate is defined, make sure cal date is NOT before start date return true; var now = new Date() now.setHours(0,0,0,0) if (dateCheckOut < now) // check out date can not be befor today if startDate NOT defined return true; return false; } function disallowDateAfter(dateCheckIn) { dateCheckIn.setHours(0,0,0,0) if ((endDate != null) && dateCheckIn > endDate) // endDate defined, calendar date can NOT be after endDate return true; var now = new Date() now.setHours(0,0,0,0) if (dateCheckIn < now) // endDate NOT defined, calendar date can not be before today return true; return false; } // end hiding contents from old browsers --> </script> <script type="text/javascript"> var cal = new Zapatec.Calendar.setup({ inputField : "date_available", // id of the input field button : "button2", // What will trigger the popup of the calendar ifFormat : "%m-%d-%Y", // format of the input field: Mar 18, 2005 showsTime : false, //no time dateStatusFunc : disallowDateAfter, //the function to call onUpdate : filterDates1 }); </script> </td> </tr> </table> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top" class="text1"><? if( $global["feature"]["social_security_number"] == true ){ echo "Social Security No."; } ?></td> <td align="left" valign="middle"> <? if( $global["feature"]["social_security_number"] == true ){ echo ' <input name="social_security_number" id="social_security_number" value="' . $_POST['social_security_number'] . '" type="text" class="textbox1" /> <span id="spansocial_security_number" class="normal"> </span> '; } else { echo " "; } ?> </td> </tr> </table> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="top" class="text1">Desired Salary $</td> <td align="left" valign="top"> <input onFocus="preventOpp('desired_salary');" name="desired_salary" id="desired_salary" value="<?php echo $row_app_general['desired_salary']; ?> " type="text" class="textbox7" /> <span id="spandesired_salary" class="normal"> </span> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1">Position Applied for</td> <td align="left" valign="middle"> <select name="position_applied" id="position_applied" class="dropdownlist1"> <option value="">---- Select Position For ----</option> <option value="Dentist" <?php if ($row_app_general['position_applied'] == "Dentist") { echo 'selected="selected"'; } ?> >Dentist</option> <option value="Dental Professionals" <?php if ($row_app_general['position_applied'] == "Dental Professionals") { echo 'selected="selected"'; } ?> >Dental Professionals</option> <option value="Team Lead" <?php if ($row_app_general['position_applied'] == "Team Lead") { echo 'selected="selected"'; } ?> >Team Lead</option> <option value="Other">Other</option> </select> <span id="spanposition_applied" class="normal"> </span> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1">Have you ever applied with this company before? Yes <input value="yes" name="before_applied" id="before_applied_yes" type="radio" <?php if ($row_app_general['before_applied'] == "yes" || $row_app_general['before_applied'] == "Yes") { echo 'checked="checked"'; } ?> /> NO <input value="no" name="before_applied" id="before_applied_no" type="radio" <?php if ($row_app_general['before_applied'] == "no" || $row_app_general['before_applied'] == "No") { echo 'checked="checked"'; } ?> /> <span id="spanbefore_applied" class="normal"> </span> </td> <td align="left" valign="middle" class="text1">If so , When? <input value="<?php echo $row_app_general['when_before_applied']; ?> " name="before_applied_when" id="before_applied_when" type="text" class="textbox5" /> <span id="spanbefore_applied_when" class="normal"> </span></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1">Have you ever worked for this company? Yes <input name="ever_worked" id="ever_worked_yes" type="radio" value="yes" <?php if ($row_app_general['ever_worked'] == "yes" || $row_app_general['ever_worked'] == "Yes") { echo 'checked="checked"'; } ?> /> NO <input name="ever_worked" id="ever_worked_no" type="radio" value="no" <?php if ($row_app_general['ever_worked'] == "no" || $row_app_general['ever_worked'] == "No") { echo 'checked="checked"'; } ?> /> <span id="spanever_worked" class="normal"> </span></td> <td align="left" valign="middle" class="text1">If so , When? <input name="ever_worked_when" id="ever_worked_when" type="text" class="textbox5" value="<?php echo $row_app_general['when_ever_worked']; ?> " /> <span id="spanever_worked_when" class="normal"> </span> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="middle" class="text1">Have you ever been convicted of a felony ? Yes <input name="felony" id="felony_yes" type="radio" value="yes" <?php if ($row_app_general['felony'] == "yes" || $row_app_general['felony'] == "Yes") { echo 'checked="checked"'; } ?> /> NO <input name="felony" id="felony_no" type="radio" value="no" <?php if ($row_app_general['felony'] == "no" || $row_app_general['felony'] == "No") { echo 'checked="checked"'; } ?> /> <span id="spanfelony" class="normal"> </span> </td> <td align="left" valign="middle" class="text1">If so , When? <input name="felony_when" id="felony_when" type="text" class="textbox5" value="<?php echo $row_app_general['when_felony']; ?> " /></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1"> <tr> <td height="25" align="left" valign="middle" class="login">EDUCATION</td> </tr> <tr> <td align="left" valign="top"><table><?php $this->EditApplicationEducation('local', $this->cont_id); ?> </table></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1"> <tr> <td align="left" valign="middle" class="login">REFERENCES</td> </tr> <tr> <td align="left" valign="middle" class="text2">Please list three professional references.</td> </tr> <tr> <td align="left" valign="top"><table><?php $this->EditApplicationReference('local', $this->cont_id); ?> </table></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1"> <tr> <td align="left" valign="middle" class="login">PREVIOUS EMPLOYMENT - BEGINNING WITH YOUR MOST RECENT EMPLOYER</td> </tr> <tr> <td align="left" valign="middle"> </td> </tr> <tr> <td align="left" valign="top"><table><?php $this->EditApplicationEmployment('local', $this->cont_id); ?> </table></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="border1"> <tr> <td height="25" align="left" valign="middle" class="login">MILITARY SERVICE</td> </tr> <tr> <td align="left" valign="middle"> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1">Branch</td> <td align="left" valign="middle"> <input name="military_branch" id="military_branch" value="<?php echo $row_military['military_branch']; ?> " type="text" class="textbox9" /> </td> </tr> </table> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1">From</td> <td align="left" valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left"><input value="<?php echo $row_military['military_from']; ?> " name="military_from" id="military_from" readonly="readonly" type="text" class="date" /></td> <td w align="left"> <img src="../images/b_calendar.png" id='button18' onMouseOver="javascript:document.body.style.cursor='hand';" onMouseOut="javascript:document.body.style.cursor='default';"></td> </tr> <script type="text/javascript"> var cal = new Zapatec.Calendar.setup({ inputField:"military_from", ifFormat:"%m-%d-%Y", button:"button18", showsTime:false }); </script> </table> </td> <td align="left" valign="middle" class="text1">To</td> <td align="left" valign="middle"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left"><input value="<?php echo $row_military['military_to']; ?> " name="military_to" id="military_to" readonly="readonly" type="text" class="date" /></td> <td align="left"><img src="../images/b_calendar.png" id='button19' onMouseOver="javascript:document.body.style.cursor='hand';" onMouseOut="javascript:document.body.style.cursor='default';"></td> </tr> <script type="text/javascript"> var cal = new Zapatec.Calendar.setup({ inputField:"military_to", ifFormat:"%m-%d-%Y", button:"button19", showsTime:false }); </script> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1">Rank at Discharge</td> <td align="left" valign="middle"><input name="rank_at_discharge" id="rank_at_discharge" value="<?php echo $row_military['rank_at_discharge']; ?> " type="text" class="textbox9" /></td> </tr> </table> </td> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" align="left" valign="middle" class="text1">Type of Discharge</td> <td align="left" valign="middle"><input name="type_of_discharge" id="type_of_discharge" value="<?php echo $row_military['type_of_discharge']; ?> " type="text" class="textbox9" /></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="27%" height="30" align="left" valign="middle" class="text1">If other than honorable, explain</td> <td width="600" align="left" valign="middle"><input name="honorable" id="honorable" value="<?php echo $row_military['honorable']; ?> " type="text" class="textbox14" /></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> </table></td> </tr> <tr> <td align="center" valign="top"> <input type="submit" name="btnRegistration" value="Update" id="btnRegistration" onClick="return <?php echo $this->ValidationFunctionName; ?> ();" /></td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top"> </td> </tr> </table> </form> <?php break; case 'server': $this->cont_id = $contact_id; extract($_POST); $return = true; if ($this->Form->ValidField($first_name, 'empty', 'Please Enter Your First Name') == false) { $return = false; } if ($this->Form->ValidField($last_name, 'empty', 'Please Enter Your Last') == false) { $return = false; } if ($this->Form->ValidField($street_address, 'empty', 'Please Enter Street Address') == false) { $return = false; } if ($this->Form->ValidField($city, 'empty', 'Please Enter City') == false) { $return = false; } /*if($this->Form->ValidField($state,'empty','Please Enter State')==false) $return =false;*/ if ($this->Form->ValidField($zip, 'empty', 'Please Enter Zip Code') == false) { $return = false; } /*if($this->Form->ValidField($phone,'empty','Please Enter Phone Number')==false) $return =false; if($this->Form->ValidField($email,'empty','Please Enter Email-Id')==false) $return =false; */ if ($this->Form->ValidField($position_applied, 'empty', 'Please Enter Position Applied For') == false) { $return = false; } if ($return) { if (true) { /***************************** insert as contact ***************************************/ $update_sql_array = array(); $update_sql_array['first_name'] = $_POST[first_name]; $update_sql_array['type'] = 'People'; $update_sql_array['user_id'] = $user_id; $update_sql_array['last_name'] = $_POST[last_name]; $this->db->update(TBL_CONTACT, $update_sql_array, "contact_id", $this->cont_id); $this->contact->contact_id = $this->cont_id; /*$this->contact->EditContactPhone('server'); $this->contact->EditContactEmail('server'); $this->contact->EditContactIm('server'); $this->contact->EditContactWebsite('server'); $this->contact->EditContactTwitter('server');*/ /*$insert_sql_array = array(); $insert_sql_array['contact_id'] = $this->contact_id; $insert_sql_array['number'] = $_POST[phone]; $insert_sql_array['type'] = 'Home'; $this->db->insert(CONTACT_PHONE,$insert_sql_array); $insert_sql_array = array(); $insert_sql_array['contact_id'] = $this->contact_id; $insert_sql_array['email'] = $_POST[email]; $insert_sql_array['type'] = 'Home'; $this->db->insert(CONTACT_EMAIL,$insert_sql_array);*/ /*$contact_info = array(); $contact_info['user_id'] = $user_id; $contact_info['name'] = $_POST[first_name]; $contact_info['lname'] = $_POST[last_name]; $contact_info['type'] = 'People'; $contact_info['phone'] = $_POST[phone]; $contact_info['email'] = $_POST[email]; $this->contact_id = $this->contact->Addcontact_On_Fly($contact_info,'',true);*/ /*****************************************insert address in contact*******************/ $update_sql_array = array(); $update_sql_array['street_address'] = $_POST['street_address']; $update_sql_array['city'] = $_POST['city']; $update_sql_array['state'] = $_POST['state']; $update_sql_array['zip'] = $_POST['zip']; $update_sql_array['type'] = 'Home'; $this->db->update(CONTACT_ADDRESS, $update_sql_array, "contact_id", $this->cont_id); /**************************************************************************************/ //////security setting ///////////////// /* $this->security->SetModule_name($this->module); $this->security->SetModule_id($this->cont_id); $this->security->Add_Rule_Webform('server');*/ /////////////////////////////////////// /*************************************************************************************/ /*$sql="delete from ".EM_WEB_APP_INFO." where contact_id='$this->cont_id'"; $this->db->query($sql,__FILE__,__LINE__); $insert_sql_array = array(); $insert_sql_array['contact_id'] = $this->cont_id; $this->db->insert(EM_WEB_APP_INFO,$insert_sql_array);*/ /*****************************************************************************************/ $update_sql_array = array(); $update_sql_array['date_available'] = $_POST['date_available']; $update_sql_array['desired_salary'] = $_POST['desired_salary']; $update_sql_array['position_applied'] = $_POST['position_applied']; $update_sql_array['before_applied'] = $_POST['before_applied']; $update_sql_array['felony'] = $_POST['felony']; $update_sql_array['ever_worked'] = $_POST['ever_worked']; $update_sql_array['mi'] = $_POST['middle_name']; $update_sql_array['apartment'] = $_POST['apartment_no']; $update_sql_array['date'] = $_POST['date_posted']; $update_sql_array['when_felony'] = $_POST['felony_when']; $update_sql_array['when_ever_worked'] = $_POST['ever_worked_when']; $update_sql_array['when_before_applied'] = $_POST['before_applied_when']; //$insert_sql_array['sign'] = $_POST['signature']; $this->db->update(EM_APPLICATION_GENERAL, $update_sql_array, "contact_id", $this->cont_id); /*********************************************************************************************/ $this->EditApplicationEducation('server', $this->cont_id); /*if($_POST['high_school']) { $insert_sql_array = array(); $insert_sql_array['contact_id'] = $this->cont_id; $insert_sql_array['education_id'] = $_POST['high_school']; $insert_sql_array['title'] = $_POST['title_hs']; $insert_sql_array['address'] = $_POST['address_high_school']; $insert_sql_array['education_from'] = $_POST['high_school_from']; $insert_sql_array['education_to'] = $_POST['high_school_to']; $insert_sql_array['graduate'] = $_POST['graduate']; $insert_sql_array['graduate_degree'] = $_POST['graduate_degree']; $this->db->insert(EM_APPLICATION_EDUCATION,$insert_sql_array); } if($_POST['college']) { $insert_sql_array = array(); $insert_sql_array['contact_id'] = $this->cont_id; $insert_sql_array['education_id'] = $_POST['college']; $insert_sql_array['title'] = $_POST['title_cg']; $insert_sql_array['address'] = $_POST['college_address']; $insert_sql_array['education_from'] = $_POST['college_from']; $insert_sql_array['education_to'] = $_POST['college_to']; $insert_sql_array['graduate'] = $_POST['college_graduate']; $insert_sql_array['graduate_degree'] = $_POST['college_graduate_degree']; $this->db->insert(EM_APPLICATION_EDUCATION,$insert_sql_array); } if($_POST['other_degree']) { $insert_sql_array = array(); $insert_sql_array['contact_id'] = $this->cont_id; $insert_sql_array['education_id'] = $_POST['other_degree']; $insert_sql_array['title'] = $_POST['title_ot']; $insert_sql_array['address'] = $_POST['other_education_address']; $insert_sql_array['education_from'] = $_POST['other_degree_from']; $insert_sql_array['education_to'] = $_POST['other_degree_to']; $insert_sql_array['graduate'] = $_POST['other_graduate']; $insert_sql_array['graduate_degree'] = $_POST['other_degree_details']; $this->db->insert(EM_APPLICATION_EDUCATION,$insert_sql_array); }*/ /*********************************************************************************************/ $this->EditApplicationReference('server', $this->cont_id); /*$i; for($i=1; $i<4; $i+=1){ if($_POST['reference_name'.$i]) { $insert_sql_array = array(); $insert_sql_array['contact_id'] = $this->cont_id; $insert_sql_array['reference_name'] = $_POST['reference_name'.$i]; $insert_sql_array['reference_relation'] = $_POST['reference_relation'.$i]; $insert_sql_array['reference_company'] = $_POST['reference_company'.$i]; $insert_sql_array['reference_phone'] = $_POST['reference_phone'.$i]; $insert_sql_array['reference_address'] = $_POST['reference_address'.$i]; $this->db->insert(EM_APPLICATION_REFERENCES,$insert_sql_array); } }*/ /*********************************************************************************************/ $this->EditApplicationEmployment('server', $this->cont_id); /*for($i=1; $i<4; $i+=1){ if($_POST['previous_company'.$i]) { $insert_sql_array = array(); $insert_sql_array['contact_id'] = $this->cont_id; $insert_sql_array['previous_company'] = $_POST['previous_company'.$i]; $insert_sql_array['previous_company_phone'] = $_POST['previous_company_phone'.$i]; $insert_sql_array['previous_company_address'] = $_POST['previous_company_address'.$i]; $insert_sql_array['previous_company_supervisor'] = $_POST['previous_company_supervisor'.$i]; $insert_sql_array['previous_job_title'] = $_POST['previous_job_title'.$i]; $insert_sql_array['previous_starting_salary'] = $_POST['previous_starting_salary'.$i]; $insert_sql_array['previous_ending_salary'] = $_POST['previous_ending_salary'.$i]; $insert_sql_array['responsibility'] = $_POST['previous_responsibilities'.$i]; $insert_sql_array['from'] = $_POST['previous_from'.$i]; $insert_sql_array['to'] = $_POST['previous_to'.$i]; $insert_sql_array['reason'] = $_POST['previous_reason_for_leaving'.$i]; $insert_sql_array['may_contact_supervisor'] = $_POST['previous_supervisor'.$i]; $this->db->insert(EM_APPLICATION_PREVIOUS_EMPLOYMENT,$insert_sql_array); } }*/ /*********************************************************************************************/ $update_sql_array = array(); $update_sql_array['military_branch'] = $_POST['military_branch']; $update_sql_array['military_from'] = $_POST['military_from']; $update_sql_array['military_to'] = $_POST['military_to']; $update_sql_array['rank_at_discharge'] = $_POST['rank_at_discharge']; $update_sql_array['type_of_discharge'] = $_POST['type_of_discharge']; $update_sql_array['honorable'] = $_POST['honorable']; $this->db->update(EM_APPLICATION_MILITARY_SERVICE, $update_sql_array, "contact_id", $this->cont_id); /*******************************************************************************************/ $_SESSION[msg] = 'Contact Details has been Updated'; ?> <script type="text/javascript"> window.location = '<?php echo $_SERVER['PHP_SELF']; ?> ?contact_id=<?php echo $this->cont_id; ?> ' </script> <?php } } else { echo $this->Form->ErrtxtPrefix . $this->Form->ErrorString . $this->Form->ErrtxtSufix; $this->EditResume('local', $this->cont_id); } break; default: echo 'Wrong Paramemter passed'; } }
require_once 'class/class.CalcDate.php'; $fileserver = new fileserver(); //echo "FILESERVER_PRE"; $fileserver->check_fileUpload(); //echo "FILESERVER_POST"; $page = new basic_page(); $page->auth->Checklogin(); $notify = new Notification(); $ajax = new PHPLiveX(); $workorder = new WorkOrder(); $project = new Project(); $note = new Note(); $user = new User(); $task = new Tasks(); $global_task = new GlobalTask(); $em = new Event_Contacts(); $task->SetUserObject($user); $task->SetUserID($page->auth->Get_user_id()); $ajax->AjaxifyObjects(array("fileserver", "global_task", "project", "task", "global_task", "workorder", "em", "note")); $em->SetUserID($page->auth->Get_user_id()); $em->SetContactID($_SESSION['contact_id']); $em->SetUserName($page->auth->Get_user_name()); $page->setPageKeywords(''); $page->setPageDescription(''); $page->setPageTitle("WORK ORDER"); $page->setActiveButton('9'); $page->SetDynamicCSS_1('main_style.php'); $page->SetDynamicCSS_2('form.php'); $page->setImportCss3('src/css/jscal2.css'); $page->setImportCss4('src/css/border-radius.css'); //$page -> setImportCss5('src/css/win2k/win2k.css');
<?php require_once 'app_code/config.inc.php'; require_once 'class/class.contacts.php'; require_once 'app_code/zipcode.class.php'; require_once 'app_code/class.Event_Contacts.php'; $page = new basic_page(); $page->auth->Checklogin(); $ajax = new PHPLiveX(); $em = new Event_Contacts(); $em->SetUserID($page->auth->Get_user_id()); $ajax->AjaxifyObjects(array("em")); $page->setPageKeywords(''); $page->setPageDescription(''); $page->setPageTitle("CONTACT ADD COMPANY"); $page->setActiveButton('2'); //$page -> setInnerNav(''); //$page -> setImportCss1('main_style.css'); //$page -> setImportCss2('form.css'); $page->SetDynamicCSS_1('main_style.php'); $page->SetDynamicCSS_2('form.php'); $page->setImportCss3(''); $page->SetDynamicCSS_3('css/all.php'); $page->setImportCss5(''); $page->setExtJavaScripts1('<script src="sprockets.js" type="text/javascript"></script>'); // might not need //*********************Page Style *******************************// // used to set page styles. This should be used sparingly. External css should be used instead. $page_style = ' '; $page->setPageStyle($page_style);
<?php require_once 'app_code/config.inc.php'; require_once 'class/class.contacts.php'; require_once 'app_code/zipcode.class.php'; require_once 'app_code/class.Event_Contacts.php'; $page = new basic_page(); $page->auth->Checklogin(); $em = new Event_Contacts(); //if($_REQUEST[contact_id]=='') { // $page->gotoPage('contacts.php'); // exit(); // } if ($page->auth->checkPermessionEdit('TBL_CONTACT', $_REQUEST[contact_id]) == 0 and $page->auth->isOwner(TBL_CONTACT, " and contact_id='{$_REQUEST['contact_id']}'") == 0) { $page->auth->SendToRefrerPage(); exit; } $ajax = new PHPLiveX(); $em->SetUserID($page->auth->Get_user_id()); $ajax->AjaxifyObjects(array("em")); $page->setPageKeywords(''); $page->setPageDescription(''); $page->setPageTitle("CONTACT EDIT"); $page->setActiveButton('2'); //$page -> setInnerNav(''); //$page -> setImportCss1('main_style.css'); //$page -> setImportCss2('form.css'); $page->SetDynamicCSS_1('main_style.php'); $page->SetDynamicCSS_2('form.php'); $page->setImportCss3(''); $page->SetDynamicCSS_3('css/all.php');
//ini_set("display_errors" , 1 ); require_once 'app_code/config.inc.php'; require_once 'class/class.contacts.php'; require_once 'app_code/zipcode.class.php'; require_once 'app_code/class.Event_Contacts.php'; if (PHONE_SYSTEM == "asterisk") { require_once 'class/class.asterisk.php'; $asterisk = new Asterisk(); } $page = new basic_page(); $page->auth->Checklogin(); $notify = new Notification(); $ajax = new PHPLiveX(); //$contact=new Company_Global(); $em = new Event_Contacts(); $em->SetGroups($page->auth->Get_group()); $em->SetUserID($page->auth->Get_user_id()); $em->SetUserName($page->auth->Get_user_name()); $ajax->AjaxifyObjects(array("em")); $page->setPageKeywords(''); $page->setPageDescription(''); $page->setPageTitle("CONTACTS"); $page->setActiveButton('2'); //$page -> setInnerNav(''); //$page -> setImportCss1('main_style.css'); //$page -> setImportCss2('form.css'); $page->SetDynamicCSS_1('main_style.php'); $page->SetDynamicCSS_2('form.php'); $page->setImportCss3(''); $page->setImportCss4('');
<?php require_once 'app_code/config.inc.php'; require_once 'class/class.contacts.php'; require_once 'app_code/zipcode.class.php'; require_once 'app_code/class.Event_Contacts.php'; $page = new basic_page(); $page->auth->Checklogin(); $ajax = new PHPLiveX(); $em = new Event_Contacts(); $em->SetUserID($page->auth->Get_user_id()); $ajax->AjaxifyObjects(array("em")); $page->setPageKeywords(''); $page->setPageDescription(''); $page->setPageTitle("CONTACT ADD PERSON"); $page->setActiveButton('2'); //$page -> setInnerNav(''); //$page -> setImportCss1('main_style.css'); //$page -> setImportCss2('form.css'); $page->SetDynamicCSS_1('main_style.php'); $page->SetDynamicCSS_2('form.php'); $page->setImportCss3(''); $page->SetDynamicCSS_3('css/all.php'); $page->setImportCss5('autocomplete/styles.css'); $page->setExtJavaScripts1('<script src="sprockets.js" type="text/javascript"></script>'); // might not need $page->setExtJavaScripts2('<script type="text/javascript" src="autocomplete/prototype.js"></script>'); $page->setExtJavaScripts3('<script type="text/javascript" src="autocomplete/autocomplete.js"></script>'); $page->setCustomJavaScripts(''); //*********************Page Style *******************************// // used to set page styles. This should be used sparingly. External css should be used instead.
<?php require_once 'app_code/config.inc.php'; require_once 'class/class.contacts.php'; require_once 'app_code/zipcode.class.php'; require_once 'app_code/class.Event_Contacts.php'; $page = new basic_page(); $em = new Event_Contacts(); $em->SetUserID($_SESSION['user_id']); $contact_id = $vars['contact_id']; ?> <table style="width: 100%"><tr><td style="width: 80%;"> <div id="content_column_header"> Edit Contact </div> <div class="contact_form cf_editor"> <div><?php echo $em->edit_contact_ui($contact_id); ?> </div> </div> <hr class="cf_break"> <a style="font-weight: bold;" onclick="<?php echo $page->dynamic_page->phplivex_subpage_link('contacts', 'contact_profile', 'display_contact_area', array('contact_id' => $em->get_company_contact_id($contact_id))); ?> " >« Back To Contact</a>
function addEventDate($runat,$event_id,$event_date='',$start_time='',$end_time=''){ ob_start(); $this->event_id=$event_id; switch($runat) { case 'local': $FormName='FrmAddDate'; $ControlNames=array("event_date" =>array('event_date',"''","Please Select Event Date ","span_event_date") ); $ValidationFunctionName="CheckValidity"; $JsCodeForFormValidation=$this->validity->ShowJSFormValidationCode($FormName,$ControlNames,$ValidationFunctionName,$SameFields,$ErrorMsgForSameFields); echo $JsCodeForFormValidation; ?> <script type="text/javascript"> function checkTime(start_time,end_time){ var temp_start1 = new Array(); var temp_end1 = new Array(); var temp_start = new Array(); var temp_end = new Array() var flag=0; temp_start1 = start_time.split(" "); temp_end1 = end_time.split(" "); temp_start = temp_start1[0].split(":"); temp_end = temp_end1[0].split(":"); if(temp_start1[1]=='pm') { temp_start[0]=parseInt(temp_start[0])+12; } if(temp_end1[1]=='pm') { temp_end[0]=parseInt(temp_end[0])+12; } if(parseInt(temp_start[0]) > parseInt(temp_end[0])) { flag=1; } else if(parseInt(temp_start[0]) == parseInt(temp_end[0]) && parseInt(temp_start[1]) > parseInt(temp_end[1])) { flag=1; } if(flag==1) { alert('Start time is greater then end time !!'); return false; } else return true; } </script> <div class="prl"> </div> <div id="lightbox"> <div style="background-color:#ADC2EB;" align="left" class="ajax_heading"> <div id="TB_ajaxWindowTitle">Add Event Date</div> <div id="TB_closeAjaxWindow"><a href="javascript:void(0)" onclick="javascript: document.getElementById('div_event').style.display='none';jQuery.ptTimeSelect.closeCntr();"><img border="0" src="images/close.gif" alt="close" /></a></div> </div> <div class="white_content"> <div style="padding:20px;" class="form_main"> <ul id="error_list"> <li><span id="span_event_date"></span></li> </ul> <form name="<?php echo $FormName; ?>" method="post" action="" enctype="multipart/form-data" > <table class="table" width="100%"> <tr> <th>Event Date</th><td> <?php if($event_date=='') { $sql = "select * from ".EM_DATE." where event_id= ".$this->event_id." order by event_date desc limit 1"; $result = $this->db->query($sql,__FILE__,__lINE__); $row = $this->db->fetch_array($result); $d = explode("-",$row['event_date']); if($row['event_date']) $event_date= date("Y-m-d",mktime(0, 0, 0, $d[1], ($d[2]+1), $d[0])); else $event_date= date("Y-m-d"); } ?> <input name="event_date" type="text" id="event_date" value="<?php echo $event_date;?>" readonly="true"/> <script type="text/javascript"> function start_cal() { new Calendar({ inputField : "event_date", dateFormat : "%Y-%m-%d", trigger : "event_date", weekNumbers : true, bottomBar : true, selected : <?php echo $event_date;?>, onSelect : function() { this.hide(); document.<?php echo $FormName;?>.event_date.value=this.selection.print("%Y-%m-%d"); } }); } </script> <a href="javascript:void(0);" onclick="javascript: document.<?php echo $FormName;?>.event_date.value='';"><img src="images/trash.gif" border="0"/></a> </td> <th>Start Time</th> <td><input id='start_time' name="start_time" type='text' value="00:00 am" size="8" maxlength="8" ></td> </td> <th>End Time</th> <td><input id='end_time' name="end_time" type='text' value="00:00 pm" size="8" maxlength="8" ></td> <td><input type="button" name="submit" value="Add" id="submit" onClick="javascript: if(<?php echo $ValidationFunctionName; ?>()) { if(checkTime(this.form.start_time.value,this.form.end_time.value)) { evt.checkConflict(this.form.event_date.value,'<?php echo $event_id; ?>',{onUpdate: function(response,root){ res_arr = response.split('^'); if(res_arr[0]>0 || res_arr[1]>0){ if(confirm('you have conflict in '+res_arr[0]+' contact(s) <?php if(count($_SESSION[contact_conflict])>0){ echo "with contact id(s) "; for($k=0;$k<count($_SESSION[contact_conflict]);$k++) echo $_SESSION[contact_conflict][$k].","; } ?> and '+res_arr[1]+' equipment(s) <?php if(count($_SESSION[equipment_conflict])>0){ echo "with equipment id(s) "; for($k=0;$k<count($_SESSION[equipment_conflict]);$k++) echo $_SESSION[equipment_conflict][$k].","; } ?>.\nDo you wish to continue.')) { if(res_arr[0]>0){ evt.addTaskForContact('<?php echo $event_id; ?>',{preloader:'prl'}); } if(res_arr[1]>0){ evt.addTaskForEquipment('<?php echo $event_id; ?>',{preloader:'prl'}); } evt.addEventDate('server','<?php echo $event_id; ?>',document.getElementById('event_date').value,document.getElementById('start_time').value,document.getElementById('end_time').value,{target:'div_event', preloader: 'prl'}); } else { document.getElementById('div_event').style.display='none'; evt.ShowEventDate('<?php echo $event_id ?>',{target:'event_date',preloader: 'prl'}); } } else { evt.addEventDate('server','<?php echo $event_id; ?>',document.getElementById('event_date').value,document.getElementById('start_time').value,document.getElementById('end_time').value,{target:'div_event', preloader: 'prl'}); } }, preloader: 'prl'}); } } jQuery.ptTimeSelect.closeCntr();return false;" /></td> </tr> </table> </form> </div></div></div> <?php break; case 'server': $sql_date = "select event_date from ".EM_DATE." where event_id= '".$event_id."'"; $result_date = $this->db->query($sql_date,__FILE__,__LINE__); while($row_date = $this->db->fetch_array($result_date)) if($row_date['event_date']==$event_date) $flag=1; if($flag==1) { ?><script> alert("Select a new date!! This date is already exist!!"); evt.addEventDate('local','<?php echo $this->event_id;?>', { onUpdate: function(response,root){ document.getElementById('div_event').innerHTML=response; document.getElementById('div_event').style.display=''; start_cal(); }, preloader: 'prl' } ); </script> <?php } else { $insert_sql_array[event_date] = $event_date; $insert_sql_array[end_time] = $end_time; $insert_sql_array[start_time] = $start_time; $insert_sql_array[event_id] = $event_id; $this->db->insert(EM_DATE,$insert_sql_array); $con = new Event_Contacts(); $sql = "select * from ".EM_DATE." where event_id= '".$event_id."'"; $result = $this->db->query($sql,__FILE__,__LINE__); $sql_staff = "select * from ".EM_STAFFING." where event_id= '".$event_id."' and status='Staffed'"; $result_staff = $this->db->query($sql_staff,__FILE__,__LINE__); while($row_staff = $this->db->fetch_array($result_staff)) { if($row_staff[contact_id]){ while($row = $this->db->fetch_array($result)) { $con->Availability($row_staff[contact_id],$event_id,$row['event_date'],$row['start_time'],$row['end_time'],'Event Assigned'); } } } /********************************************/ $sql = "select * from ".EM_EVENT." where event_id= '".$event_id."'"; $result = $this->db->query($sql,__FILE__,__LINE__); $row = $this->db->fetch_array($result); if(count($_SESSION[equipment_conflict])>0){ $sql_eve = "select * from ".EM_EVENT_EQUIPMENT." where event_id= '".$event_id."'"; $result_eve = $this->db->query($sql_eve,__FILE__,__LINE__); while($row_eve = $this->db->fetch_array($result_eve)) { $sql_avail = "update ".EM_EQUIPMENT_AVAILABILITY." set `status`='".$row[group_event_id]."' where `event_id`= '".$event_id."' and `unavailability_date`='".$event_date."' and `equipment_id`='".$row_eve[equipment_id]."'"; ?><script type="text/javascript">alert('<?php echo $sql_avail; ?>')</script><? $this->db->query($sql_avail,__FILE__,__LINE__); } } else { $equipment = new Equipment(); $sql = "select * from ".EM_DATE." where event_id= '".$event_id."'"; $result = $this->db->query($sql,__FILE__,__LINE__); $sql_equip = "select * from ".EM_EVENT_EQUIPMENT." where event_id= '".$event_id."'"; $result_equip = $this->db->query($sql_equip,__FILE__,__LINE__); while($row_equip = $this->db->fetch_array($result_equip)) { while($row = $this->db->fetch_array($result)) { $equipment->assignEquipment($row_equip[equipment_id],$event_id); } } } } ?> <script type="text/javascript"> document.getElementById('div_event').innerHTML=''; evt.ShowEventDate('<?php echo $this->event_id ?>',{target:'event_date',preloader: 'prl'}); </script> <?php break; } $html = ob_get_contents(); ob_end_clean(); return $html; }
<?php require_once 'app_code/config.inc.php'; require_once 'class/class.contacts.php'; require_once 'app_code/zipcode.class.php'; require_once 'app_code/class.Event_Contacts.php'; require_once 'class/class.note.php'; require_once 'class/class.tasks.php'; require_once 'app_code/global.config.php'; require_once 'app_code/class.CertificationType.php'; require_once 'app_code/class.application.php'; require_once 'app_code/class.Event.php'; require_once 'class/class.securenote.php'; $secure = new secure(); if (PHONE_SYSTEM == "asterisk") { require_once 'class/class.asterisk.php'; $asterisk = new Asterisk(); } $contact_id = $vars['contact_id']; $em = new Event_Contacts(); $em->SetContactID($contact_id); $contact = new Contacts(); $evt = new Event(); $page = new basic_page(); $note = new Note(); $task = new Tasks(); $notify = new Notification(); $cert = new Certification_Type(); $app = new Application(); $dynamic_page = new dynamic_page(); $note->Create_Note('server', '', '', $_SESSION['user_id']);
function assignStaff($event_id = '', $staffing_id = '', $contact_id = '') { ob_start(); $sql_staff = "select * from " . EM_STAFFING . " where staffing_id='" . $staffing_id . "'"; $result_staff = $this->db->query($sql_staff, __FILE__, __LINE__); $row = $this->db->fetch_array($result_staff); $event_id = $row['event_id']; if ($row['contact_id'] != '') { $this->deletePosition($staffing_id, $event_id, 'unstaff', 'false'); } $con = new Event_Contacts(); $update_sql_array = array(); $update_sql_array['contact_id'] = $contact_id; //$update_sql_array['status'] = 'Staffed'; $this->db->update(EM_STAFFING, $update_sql_array, 'staffing_id', $staffing_id); $sql = "select * from " . EM_DATE . " where event_id= '" . $event_id . "'"; $result = $this->db->query($sql, __FILE__, __LINE__); while ($row = $this->db->fetch_array($result)) { $con->Availability($contact_id, $event_id, $row['event_date'], $row['start_time'], $row['end_time'], 'Event Assigned'); } $html = ob_get_contents(); ob_end_clean(); return $html; }