Exemplo n.º 1
0
*
*
*  Copyright Contributors
*
*  ChurchInfo is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  This file best viewed in a text editor with tabs stops set to 4 characters
*
******************************************************************************/
// Initialization common to all ChurchInfo scripts
// Set error reporting
if ($debug == true) {
    Error_reporting(E_ALL ^ E_NOTICE);
} else {
    error_reporting(0);
}
//
// Basic security checks:
//
if (!$bSuppressSessionTests) {
    // Basic security: If the UserID isn't set (no session), redirect to the login page
    if (!isset($_SESSION['iUserID'])) {
        Redirect("Default.php");
        exit;
    }
    // Check for login timeout.  If login has expired, redirect to login page
    if ($sSessionTimeout > 0) {
        if (time() - $_SESSION['tLastOperation'] > $sSessionTimeout) {
<?php

Error_reporting(0);
?>
<h4>Servicio de Consulta Externa - Incapacidad</h4>
<table width="100%">
<?php 
$this->load->view('impresion/datos_basicos_consulta');
?>
<tr><th colspan="2">Incapacidad Médica</th></tr>
<tr><td>
    <table width="100%" border="1" cellspacing="2" cellpadding="2">
    <tr>
    <th align="left">Fecha Inicio:</th><td><?php 
echo $incapacidad['fecha_inicio'];
?>
 </td>
    </tr>
    <tr>
    <th align="left">Duración:</th><td> <?php 
echo numtoletras($incapacidad['duracion']);
?>
 (<?php 
echo $incapacidad['duracion'];
?>
) DÍAS</td>
    <tr>
   <tr>
    <th align="left">Finaliza el:</th><td> <?php 
echo suma_fechas($incapacidad['fecha_inicio'], $incapacidad['duracion']);
?>
Exemplo n.º 3
0
					<th colspan=2>Saturday</th>
					<th colspan=2>Sunday</th>
				</tr>
				<tr>
					<?php 
for ($i = 0; $i < 7; $i++) {
    echo "<th>Time In</th><th>Time Out</th>";
}
?>
				</tr>
				<?php 
date_default_timezone_set('America/New_York');
$today = date("N");
$timepoints = array("mon_in", "mon_out", "tue_in", "tue_out", "wed_in", "wed_out", "thu_in", "thu_out", "fri_in", "fri_out", "sat_in", "sat_out", "sun_in", "sun_out");
ini_set('display_errors', 'on');
Error_reporting(E_ALL);
require "sql.php";
$sql = "SELECT * FROM people order by name";
$result = $conn->query($sql);
//To calculate attendance
function score($row, $timepoints)
{
    $nthweek = date("W") - date("W", strtotime(date("Y-m-00", time())));
    $today = date("N");
    $attendance = 0;
    //if ($nthweek==4)
    //  $nthweek=1; //need to know how many weeks last month
    for ($i = 1; $i < $nthweek; $i++) {
        $attendance = $attendance + $row["week" . $i] / 10;
    }
    if ($today == 7) {
Exemplo n.º 4
0

	public function etc(){
		echo '吃饭<br />';
	}

	public function intro(){
		echo '找不到工作';
		//echo $this->name;
	}
}


Human::cry(); //静态调用方法

Error_reporting(E_ALL|E_STRICT);// 开启报错

Human::etc(); //调用非静态的方法则会提示:Strict Standards: Non-static method Human::eat() should not be called statically 

/*
类->访问->静态方法 可以
类->动态方法  方法内没有this的情况下,但严重不支持.逻辑上解释不通.

对象-->访问动态方法  可以
对象-->静态方法     可以
*/