function isClockedIn( ) { global $UserID; global $db; global $Company_ID; //first we need to make sure we're dealing with an employee as they are the only ones required to clock in if ( isEmployee( $UserID ) ) { //04.28.2011 ghh - added menumodule part to keep it from showing error message when you're working with dashboard controls if ( $db->db_connect_id && ( $_COOKIE[ 'ssi_menumodule' ] != 8 ) ) { //TKS 07.25.2012 #21749 added flag per user for force clock in //first we check for the user then we go to company if they are set to a 2 //0 don't force, 1 force, 2 look at company settings $query = "select ForceClockIn from conAdditionalContacts where Login = 1 and UserID = ".$UserID; if ( !$result = $db->sql_query( $query ) ) LogError( 10556, $query .$dblang[ "ErrorInSQL" ]."<br>".$db->sql_error() ); $row = $db->sql_fetchrow( $result ); //*************************** ////TKS 07.25.2012 #21749 if we enter here then they are set to look at company settings which //holds same field name and values mean the same so we just re-use row if ( $row[ "ForceClockIn" ] == 2 ) { $query = "select ForceClockIn from optCompanyInfo"; if ( !$result = $db->sql_query( $query ) ) LogError( 1540, $query .$dblang[ "ErrorInSQL" ]."<br>".$db->sql_error() ); $row = $db->sql_fetchrow( $result ); } //has system been set to force clock ins? if ( $row[ 'ForceClockIn' ] == 1 ) { //02.20.2012 ghh - if the database is nizex_nizex then we still want to check if ( $Company_ID == 22 ) $continue = true; else $continue = false; //02.20.2012 ghh - before we force the person to clock in we need to be sure that its not a nizex employee that //is logging into a customer database because we don't need to clockin in that condition. $query = "select EmailAddress from conAdditionalContacts where UserID=$UserID and EmailAddress Like '%nizex%'"; if ( !$result = $db->sql_query( $query ) ) LogError( 9552, $query .$dblang[ "ErrorInSQL" ]."<br>".$db->sql_error() ); //02.20.2012 ghh - added if and else to this to ignore nizex employees logging into non nizex databases if ( $db->sql_numrows( $result ) == 0 || $continue ) { //now we're going to see if the user is clocked in $query = "select TimeID from prlTimeClock where TimeOut is null and TimeTypeID=3 and UserID=" .$UserID; if ( !$result = $db->sql_query( $query ) ) LogError( 1541, $query .$dblang[ "ErrorInSQL" ]."<br>".$db->sql_error() ); if ( $db->sql_numrows( $result ) > 0 ) return true; else return false; } else return true; } else return true; } else return true; } else return true; }
echo '<tr class="dt2 dt0"><td colspan=8><p class="clsNoResult">'.$this->lang->line('no_bids1').'.</p></td></tr>'; } else { echo '<tr class="dt2 dt0"><td colspan=8><p class="clsNoResult">'.$this->lang->line('no_bids').'.</p></td></tr>'; } } } ?> </tbody> </table> <!--END OF RC--> </div> <?php if(!isEmployee()) { $this->session->set_flashdata('flash_message', $this->common_model->flash_message('error',$this->lang->line('You must be logged in as a employee to place a bid'))); //redirect('info'); } else { if($jobRow->job_status == 0) { if(count($tot) > 0) $toDisp = $this->lang->line('Edit Bid'); else $toDisp = $this->lang->line('Place Bid'); ?> <?php //Check for the job open date is end or not