function graph_line($file, $tab)
 {
     $handle = fopen("./{$file}", "w");
     fwrite($handle, "<chart>\n");
     /* ecriture des options */
     fwrite($handle, file_get_contents('./xml/options.xml'));
     fwrite($handle, "\t<chart_data>\n");
     fwrite($handle, "\t\t<row>\n");
     fwrite($handle, "\t\t\t<null/>\n");
     for ($i = 1; $i <= 12; $i++) {
         $month = getMonth($i);
         fwrite($handle, "\t\t\t<string>{$month}</string>\n");
     }
     fwrite($handle, "\t\t</row>\n");
     /* Boucle sur chaque catégorie */
     foreach ($tab as $key => $value) {
         fwrite($handle, "\t\t<row>\n");
         fwrite($handle, "\t\t\t<string>{$key}</string>\n");
         /* Boucle sur chaque mois */
         foreach ($value as $money) {
             fwrite($handle, "\t\t\t<number>{$money}</number>\n");
         }
         fwrite($handle, "\t\t</row>\n");
     }
     fwrite($handle, "\t</chart_data>\n");
     fwrite($handle, "\t<chart_type>Line</chart_type>\n");
     fwrite($handle, "</chart>\n");
     fclose($handle);
 }
示例#2
0
function getMonths()
{
    getMonth("januar");
    getMonth("februar");
    getMonth("marec");
    getMonth("april");
    getMonth("maj");
    getMonth("junij");
    getMonth("julij");
    getMonth("avgust");
    getMonth("september");
    getMonth("oktober");
    getMonth("november");
    getMonth("december");
}
function convertMessageDate($date, $use_today = false)
{
    $day = convertDate($date, "d");
    $month = convertDate($date, "m");
    $year = convertDate($date, "Y");
    $hour = convertDate($date, "H");
    $minute = convertDate($date, "i");
    $today = date("Ymd");
    if (date("Ymd") == $year . $month . $day || !$use_today) {
        $formatted_date = "{$day}. " . getMonth($month) . " um {$hour}:{$minute}";
    } else {
        $formatted_date = "{$day}. " . getMonth($month) . " {$year}";
    }
    return $formatted_date;
}
						<td><a href="index.php?a=5&b=4&month=' . $i . '&year=' . $year . '">' . getMonth($i) . '</a></b>&nbsp;&nbsp;</td>
						
						<td>' . $tauxPresence . '%</td>
						</tr>';
    }
}
// fin du for
?>
</tbody></table>
</div></div>
			<?php 
$row = getStatPresents($month, $year, $epn, "a");
// retourne l'array de presents/inscrits/label
$nbp = mysqli_num_rows($row);
if ($nbp != 0) {
    echo '<div class="box"><div class="box-header"><i class="fa fa-bar-chart-o"></i><h3 class="box-title">D&eacute;tail pour le mois de ' . getMonth($month) . '</h3></div>
							<div class="box-body"><table class="table table-condensed"> 
								<thead><tr><th>Date</th>
									<th>Nom de l\'atelier</th>
									<th>Nb. d\'inscrits</th>
									<th>Nb. de pr&eacute;sents</th>
									<th>Taux de pr&eacute;sence</th></tr></thead><tbody>
						';
    for ($x = 1; $x <= $nbp; ++$x) {
        $presence = mysqli_fetch_array($row);
        echo '<tr>
									<td>' . $presence['date_AS'] . '</td>
									<td>' . $presence['label_atelier'] . '</td>
									<td>' . $presence['inscrits'] . '</td>
									<td>' . $presence['presents'] . '</td>
									<td>' . $presence['total'] . '%</td></tr>';
} else {
    include_once "menu.php";
    include_once 'class/Log.php';
    include_once 'class/SelectCtrl.php';
    include_once "../../class/datepicker/class.datepicker.php";
    $dp = new datepicker("{$tableprefix}");
    $dp->dateFormat = 'Y-m-d';
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
    $ctrl = new SelectCtrl();
    $accountsctrlfrom = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codefrom");
    $accountsctrlto = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codeto");
    $periodctrl = $ctrl->getSelectPeriod(0, 'Y');
    $showDateFrom = $dp->show("datefrom");
    $showDateTo = $dp->show("dateto");
    $datefrom = getMonth(date("Ymd", time()), 0);
    $dateto = getMonth(date("Ymd", time()), 1);
    echo <<<EOF
<table border='1'>
<tbody>
<tr><TH colspan='4' style='text-align: center'>Criterial</TH></tr>
\t<FORM name='frmTrialBalance' method='POST' target="_blank" >
\t<tr>
\t\t<!--
\t\t<Td class='head'>Account From</Td>
\t\t<Td  class='odd'><input name='accounts_codefrom1' value="{$accounts_codefrom}"></Td>
\t\t<Td class='head'>Account To</Td>
\t\t<Td class='odd'><input name='accounts_codeto1' value="{$accounts_codeto}"></Td>-->
\t\t
\t\t<Td class='head'>Account From</Td>
\t\t<Td  class='odd'>{$accountsctrlfrom}</Td>
\t\t<Td class='head'>Account To</Td>
示例#6
0
     $param['name'] = $request['name'];
 }
 if (isset($request['staff_cd'])) {
     $param['staff_cd'] = $request['staff_cd'];
 }
 $termid = false;
 if (isset($request['submit'])) {
     $button = key($request['submit']);
     if (isset($request['weekDays'][$button])) {
         $titleDay = $request['weekDays'][$button];
         //TOPからの遷移
         //             $year = 2014;
         //             $titleDay = 0101;
         $date = changeYYMMDD($year, $titleDay);
         $year = getYear($date);
         $month = getMonth($date);
         $day = getDayYmd($date);
         $termid = getTermId($date);
         $param['target_date'] = $date;
         $param['titleDay'] = $titleDay . '(' . $day . ')';
     }
     if (isset($request['title'][$button])) {
         $param['title'] = $request['title'][$button];
     }
     if (isset($request['comment'][$button])) {
         $param['comment'] = $request['comment'][$button];
     }
     if (isset($request['sort_order'][$button])) {
         $param['sort_order'] = $request['sort_order'][$button];
     }
     if (isset($request['holiday_flg'][$button])) {
示例#7
0
    function getUserInfoHTML($edit = 0, $notAllowdToEdit = 0)
    {
        if ($edit) {
            $LineStart = "<input type=\"text\" name=\"";
            $LineMiddle = "\" value=\"";
            $LineEnd = "\"";
        } else {
            $LineStart = "";
            $LineMiddle = "";
            $LineEnd = "";
        }
        if (isset($_POST[add_user])) {
            $addUser = true;
            ?>
		<input type="hidden" name="addUser" value="addUser">
		<?php 
        }
        ?>
	 	
	 	<input type="hidden" name="newUserApproval" value="<?php 
        echo $this->uname;
        ?>
">
	 	<input type="hidden" name="getUserInfo" value="<?php 
        echo $this->uname;
        ?>
">
	 	<input type="hidden" name="uname" value="<?php 
        echo $this->uname;
        ?>
">  
	 	<!-- 
	 	
	 	-->
	 	<table>
	 		<tr>
	 			<td>שם פרטי	</td>
	 			<td><?php 
        //echo $this->firstName
        ?>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "firstName";
        }
        echo $LineMiddle . $this->firstName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם משפחה</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "lastName";
        }
        echo $LineMiddle . $this->lastName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם משתמש</td>
	 			<td>
	 				<?php 
        //echo $this->uname;
        ?>
	 				<?php 
        echo $LineStart;
        if ($addUser) {
            echo "uname";
        }
        echo $LineMiddle . $this->uname . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>תעודת זהות</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "id";
        }
        echo $LineMiddle . $this->id . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>בית ספר</td>
	 			<td>
	 			<?php 
        //From generalFunctions.php
        if ($edit && $edit != -1) {
            ?>
 
		 					<select name="memberOfGroup" >
									<?php 
            getGroupsList($this->memberOfGroup);
            ?>
 
							</select>
	 					<?php 
        } else {
            getUserGroup($this->uname, true);
            //Echo to screen
        }
        ?>
	 			
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>טלפון</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "phone";
        }
        echo $LineMiddle . $this->phone . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>טלפון נייד</td>
	 			<td>
	 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "cellPhone";
        }
        echo $LineMiddle . $this->cellPhone . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>דוא"ל</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "email";
        }
        echo $LineMiddle . $this->email . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td> תאריך לידה</td>
	 			<td>
	 				<?php 
        //echo $LineStart;
        if ($edit) {
            ?>
 
		 								<select name="year_of_birth" >
										<?php 
            getYear($this->BirthYear);
            ?>
										</select>
		
		    
										<select name="month_of_birth" >
										<?php 
            getMonth($this->birthMonth);
            ?>
										</select>
		
		    
										<select name="day_of_birth" >
										<?php 
            getDay($this->birthDay);
            ?>
										</select> <?php 
        } else {
            if (strcmp($this->BirthYear, "") != 0 && $this->BirthYear != 0) {
                echo $LineMiddle . $this->birthDay . "/" . $this->birthMonth . "/" . $this->BirthYear . $LineEnd;
            }
        }
        ?>
</td>
	 		</tr>
	 		<tr>
	 			<td>ישוב</td>
	 			<td>
		 			<?php 
        echo $LineStart;
        if ($edit) {
            echo "city";
        }
        echo $LineMiddle . $this->city . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>רחוב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "street";
        }
        echo $LineMiddle . $this->Street . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מס' בית</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "houseNumber";
        }
        echo $LineMiddle . $this->houseNumber . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם האב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "fatherName";
        }
        echo $LineMiddle . $this->fatherName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מספר טלפון של האב</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "fatherPhoneNumber";
        }
        echo $LineMiddle . $this->fatherPhoneNo . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>שם האם</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "motherName";
        }
        echo $LineMiddle . $this->motherName . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>מספר טלפון של האם</td>
	 			<td>
	 				<?php 
        echo $LineStart;
        if ($edit) {
            echo "motherPhoneNumber";
        }
        echo $LineMiddle . $this->motherPhoneNo . $LineEnd;
        ?>
	 			</td>
	 		</tr>
	 		<tr>
	 			<td>הרשאות</td>
	 			
	 			<td>
	 				<?php 
        //From generalFunctions.php
        if ($edit == 1) {
            ?>
 
		 					<select name="permissionGroup" >
									<?php 
            getPermissionList($this->permission[PID]);
            ?>
							</select>
	 					<?php 
        } else {
            if (isset($this->permission[PGroupName])) {
                echo $this->permission[PGroupName];
            } else {
                echo "חניך";
            }
        }
        ?>
	 				<input type="hidden" name="approved" value="<?php 
        echo $this->approved();
        ?>
">
	 				</td>
	 		</tr> 			
	 		<?php 
        //			$this->birthDay="";
        //			$this->birthMonth="";
        //
        //			$this->city="";
        //			$this->Street="";
        //			$this->houseNumber="";
        //
        //			$this->memberOfGroup="";
        //			$this->permissionGroup="";
        //
        //			$this->approvedUser="";
        ?>
 
	 	</table>
	 	<table>
	 		<tr>
	 			<?php 
        if ($edit) {
            ?>
	 					<td>
	 						<input type="submit" name="userUpdateSave" value="שמור שינויים">
	 					</td>
	 					<td>
	 						<input type="submit" name="userUpdeateCancel" value="בטל שינויים">
	 					</td>
	 					<td>
	 						<input type="submit" name="resetPassword" value="איפוס סיסמא" title="איפוס הסיסמא ל1234">
	 					</td>
	 				<?php 
        } else {
            if (!$notAllowdToEdit) {
                ?>
<td><input type="submit" name="editUserData" value="ערוך"></td>
	 					<?php 
            }
        }
        ?>
	 		</tr>
	 	</table>
	 	<?php 
    }
function draw_page($persistent)
{
    ?>
<h1>ברוכים הבאים - אנא מלאו את הפרטים הבאים על מנת להצטרף למערכת</h1>
<form name="registation" method="POST">
<table>
	<tr>
		<td>*שם פרטי:</td>
		<td>
			<input type="text" name="first_name" title="הכנס שם פרטי" value="<?php 
    print_r($persistent["first_name"]);
    ?>
">
		</td>
	</tr>
	<tr>
		<td>*שם משפחה:</td>
		<td>
			<input type="text" name="last_name" title="הכנס שם משפחה"value="<?php 
    print_r($persistent["last_name"]);
    ?>
">
		</td>
	</tr>
		
	<tr>		
		<td>*שם משתמש:</td>
		<td>
			<input type="text" name="user_name" title="הכנס שם משתמש באותיות לועזיות" value="<?php 
    print_r($persistent["user_name"]);
    ?>
">
		</td>
	</tr>
	
	<tr>
		<td>*סיסמא:</td>
		<td>
			<input type="password" name="pass1"  title="הכנס סיסמה סודית" value=<?php 
    print_r($persistent["pass1"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>*אימות סיסמא:</td>
		<td>
			<input type="password" name="pass2"  title="הכנס סיסמה סודית" value=<?php 
    print_r($persistent["pass1"]);
    ?>
>
		</td>
	</tr>
 	<tr>
		<td>בית ספר:</td>
		<td>
			<select name="memberOfGroup"> 
				<?php 
    getGroupsList();
    ?>
			</select>
		</td>
	</tr> 
	<tr>
		<td>מספר זהות:</td>
		<td>
			<input type="text" name="ID" title="הכנס מספר זהות בן 9 ספרות" value="<?php 
    print_r($persistent["ID"]);
    ?>
">
		</td>
	</tr>
	
	<tr>
		<td>כתובת דוא"ל:</td>
		<td>
			<input type="text" name="email" title="הכנס כתובת דואר אלקטרוני" value=<?php 
    print_r($persistent["email"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>תאריך לידה:</td>
		<td>   
			<select name="year_of_birth" >
			<?php 
    getYear();
    ?>
			</select>
		
		    
			<select name="month_of_birth" >
			<?php 
    getMonth();
    ?>
			</select>
		
		    
			<select name="day_of_birth" >
			<?php 
    getDay();
    ?>
			</select>
		</td>
	</tr>
	
	<tr>
		<td>טלפון:</td>
		<td>
			<input type="text" name="phone" title="הכנס מספר טלפון "value=<?php 
    print_r($persistent["phone"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>טלפון סלולרי:</td>
		<td>
			<input type="text" name="cell_phone" title="הכנס מספר טלפון סלולרי" value=<?php 
    print_r($persistent["cell_phone"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>ישוב:</td>
		<td>
			<input type="text" name="city" title="הכנס את שם הישוב בו אתה גר" value=<?php 
    print_r($persistent["city"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>רחוב:</td>
		<td>
			<input type="text" name="street" title="הכנס את שם הרחוב בו אתה גר" value=<?php 
    print_r($persistent["street"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>מספר בית:</td>
		<td>
			<input type="text" name="house_number" title="הכנס את מספר הבית בו אתה גר" value=<?php 
    print_r($persistent["house_number"]);
    ?>
>
		</td>
	</tr>
	
	<tr>
		<td>שם האב:</td>
		<td>
			<input type="text" name="father_name" title="הכנס את שם האב" value="<?php 
    print_r($persistent["father_name"]);
    ?>
">
		</td>
	</tr>
	<tr>
		<td> טלפון של האב:</td>
		<td>
			<input type="text" name="father_phone" title="הכנס מספר טלפון של האב" value=<?php 
    print_r($persistent["father_phone"]);
    ?>
>
		</td>
	</tr>
	<tr>
		<td>שם האם:</td>
		<td>
			<input type="text" name="mother_name" title="הכנס את שם האם" value="<?php 
    print_r($persistent["mother_name"]);
    ?>
">
		</td>
	</tr>
	<tr>
		<td>טלפון של האם:</td>
		<td>
			<input type="text" name="mother_phone" title="הכנס מספר טלפון של האם" value=<?php 
    print_r($persistent["mother_phone"]);
    ?>
>
		</td>
	</tr>


</table>
<input type="submit" title="לחץ להרשמה" value="הירשם"></form>

<?php 
}
示例#9
0
     dbUpdate($query, $connection);
     dbLog('delete event ' . $mid, $connection);
     header('Location: manageevents.php');
 } else {
     if (isset($_GET['action']) && $_GET['action'] === 'update') {
         $connection = dbConnect();
         $events = dbQuery("SELECT * FROM events WHERE deleted=false ORDER BY date", $connection);
         $file = fopen('../events.xml', 'w');
         // exclusive lock
         if (flock($file, LOCK_EX)) {
             fwrite($file, '<?xml version="1.0" encoding="iso-8859-7"?>' . "\n");
             fwrite($file, "<Records>\n");
             foreach ($events as $event) {
                 fwrite($file, "\t<Event>\n");
                 fwrite($file, "\t\t<Year>" . substr($event['date'], 0, 4) . "</Year>\n");
                 fwrite($file, "\t\t<Month>" . getMonth(substr($event['date'], 5, 2)) . "</Month>\n");
                 fwrite($file, "\t\t<Day>" . sprintf("%d", substr($event['date'], 8, 2)) . "</Day>\n");
                 fwrite($file, "\t\t<Desc_en>" . htmlspecialchars($event['msg_en'], ENT_QUOTES) . "</Desc_en>\n");
                 fwrite($file, "\t\t<Desc_gr>" . htmlspecialchars($event['msg_gr'], ENT_QUOTES) . "</Desc_gr>\n");
                 fwrite($file, "\t\t<Link>" . htmlspecialchars($event['link'], ENT_QUOTES) . "</Link>\n");
                 fwrite($file, "\t</Event>\n");
             }
             fwrite($file, "</Records>\n");
             flock($file, LOCK_UN);
             $connection = dbConnect();
             dbLog('update XML event file', $connection);
         } else {
             echo 'Error locking file!';
         }
         fclose($file);
         header('Location: manageevents.php');
示例#10
0
文件: util.php 项目: hunkim/kproperty
function json2Arr($json)
{
    $arr = json_decode($json, true);
    // print_r($arr);
    $res = [];
    foreach ($arr['jsonList'] as $list) {
        $metadata = getMeta($list);
        // get some metadata
        $month1 = getMonth($metadata, $list['month1List']);
        $month2 = getMonth($metadata, $list['month2List']);
        $month3 = getMonth($metadata, $list['month3List']);
        $res = array_merge($res, $month1, $month2, $month3);
    }
    return $res;
}
示例#11
0
            echo "<form method=POST action='./aksi.php?module=pembelian_barang&act=input'>\n                        <input type=hidden name='tot_pembayaran' value='{$tot_pembelian}' id='tot_pembayaran'>\n                    <table class=tableku width=600>\n                        <tr><td width=65% align=right><a name='#total'>Total Pembelian</a><br />\n\t\t\t\t<a href='#total' onclick=\"Recalc();\" accesskey='u'>Hitung (U)lang</a></td><td align=right><input id='grandtotal' readonly='readonly' value='" . number_format($tot_pembelian, 0, ',', '.') . "' tabindex=15></td></tr>\n                        <tr><td width=65% align=right>Tipe Pembayaran</td>\n                            <td align=right><select name='tipePembayaran' tabindex=16>\n                                        <option value='0'>-Tipe Pembayaran-</option>";
            while ($pembayaran = mysql_fetch_array($pmbyrn)) {
                echo "<option value='{$pembayaran['idTipePembayaran']}'>{$pembayaran['tipePembayaran']}</option>";
            }
            echo "</select></td></tr>\n                        <tr><td width=65% align=right>Tanggal Pembayaran (hutang)</td><td align=right><input type=text name='tglBayar' tabindex=17></td></tr>\n                        <tr><td width=65% align=right>Nomor Invoice</td><td align=right><input type=text name='NomorInvoice' value=0 tabindex=18></td></tr>\n                        <tr><td width=65% align=right>Tanggal Invoice</td><td align=right><input type=text name='TanggalInvoice'\n\t\t\tvalue='" . date("Y-m-d") . "' tabindex=19></td></tr>\n\t\t\t<tr><td width=65% align=right>Diskon (%)</td><td align=right><input type=text id='diskonpersen' name='DiskonPersen' value=0 tabindex=20></td></tr>\n\t\t\t<tr><td width=65% align=right>Diskon (Rp)</td><td align=right><input type=text id='diskonrupiah' name='DiskonRupiah' value=0 tabindex=21></td></tr>\n\t\t\t<tr><td width=65% align=right>PPn (%)</td><td align=right><input type=text id='ppn' name='PPN' value=0 tabindex=22></td></tr>";
            echo "\n                        <tr><td colspan=2>&nbsp;</td></tr>\n                        <tr>\n\t\t\t\t<td><a href='aksi.php?module=pembelian_barang&act=batal'>BATAL</a></td>\n\n\t\t\t\t<td>\n\t\t\t\t\t<input type='hidden' name='idSupplier' value='" . $_SESSION['idSupplier'] . "'>\n\t\t\t\t\t<input type=submit value='Simpan' tabindex=23>\n\t\t\t\t</td>\n\t\t\t</tr>\n                        </table></form>\n\t\t\t";
            //fixme : Pembatalan Nota (code di atas & bawah komentar ini) perlu merujuk ke user ybs,
            // agar jangan keliru menghapus nota yang sedang di input oleh user yang lainnya
        } else {
            echo "Belum ada barang yang dibeli<br /><a href='aksi.php?module=pembelian_barang&act=batal'>BATAL</a>";
        }
        break;
    case "laporanpembeliantanggal":
        // ===============================================================================================================
        echo "<h2>Laporan Pembelian (per Tanggal)</h2>\n            <form method=POST action='?module=pembelian_barang&act=laporanpembeliantanggal&action=pilihtanggal'>\n\n                <br />Periode Laporan : Bulan :\n                <select name=bulanLaporan>";
        $dataBulan = getMonth();
        while ($bulan = mysql_fetch_array($dataBulan)) {
            echo "<option value={$bulan['bulan']}>" . getBulanku($bulan[bulan]) . "</option>";
        }
        echo "</select>, Tahun :\n            <select name=tahunLaporan>";
        $dataTahun = getYear();
        while ($tahun = mysql_fetch_array($dataTahun)) {
            echo "<option value={$tahun['tahun']}>{$tahun['tahun']}</option>";
        }
        echo "</select>\n            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit value=Lihat>\n            </form>\n            ";
        if ($_GET[action] == 'pilihtanggal') {
            // ------------------------------------------------------------
            $sql = "SELECT tglTransaksiBeli, idTransaksiBeli FROM transaksibeli\n\t\t\t\tWHERE month(tglTransaksiBeli)='{$_POST['bulanLaporan']}' AND year(tglTransaksiBeli)='{$_POST['tahunLaporan']}'\n\t\t\t\tORDER BY tglTransaksiBeli, idTransaksiBeli ASC";
            $hasil = mysql_query($sql);
            ?>
						<hr />
function showContent($authorise, $selectedText, $option)
{
    $strContent = "";
    $choice = 0;
    $dte1 = "";
    $dte2 = "";
    $curDate = "";
    $event = "";
    switch ($option) {
        case "1":
            $year = $_GET['MYear'];
            $dte1 = $year . "-" . $selectedText . "-" . "01";
            $dte2 = $year . "-" . $selectedText . "-" . "31";
            $filterval = "eventtime between '" . $dte1 . "' and '" . $dte2 . "' ";
            $choice = 1;
            break;
        case "2":
            $curDate = date("d.m.Y");
            $arrDate = explode(".", $curDate);
            $dte1 = $selectedText . "-01-01";
            $dte2 = $selectedText . "-12-31";
            $filterval = "eventtime between '" . $dte1 . "' and '" . $dte2 . "' ";
            $choice = 2;
            break;
        case "3":
            if (isset($_GET['Datestart'])) {
                $startdate = getDateToDb($_GET['Datestart']);
                $enddate = getDateToDb($_GET['Dateclose']);
            } else {
                $arrDate = strtEndDateMonthDiff();
                $startdate = $arrDate[0];
                $enddate = $arrDate[1];
            }
            $filterval = "eventtime between '" . $startdate . "' and '" . $enddate . "' ";
            $choice = 3;
            break;
        case "4":
            $filterval = "event like '%" . $selectedText . "' ";
            $choice = 4;
            break;
        default:
            break;
    }
    $result = mysql_query("select * from eventlog where 1=1  and " . $filterval . " ") or die(mysql_error());
    $paginationQuery = "select * from eventlog where 1=1  and " . $filterval;
    $intCount = mysql_num_rows($result);
    if ($intCount > 0) {
        if ($choice == 1) {
            echo '<h4>Report on ' . getMonth($selectedText) . ' ' . $_GET['MYear'] . '</h4><br>';
        } else {
            if ($choice == 2) {
                echo '<h4>Report For The Year ' . $selectedText . '</h4><br>';
            } else {
                if ($choice == 3) {
                    if (isset($_GET['Datestart'])) {
                        echo '<h4>Report on ' . $_GET['Datestart'] . ' and ' . $_GET['Dateclose'] . '</h4><br>';
                    } else {
                        echo '<h4>Report on ' . getDateFromDb($startdate) . ' and ' . getDateFromDb($enddate) . '</h4><br>';
                    }
                } else {
                    echo '<h4>Report on  ' . $selectedText . '</h4><br>';
                }
            }
        }
        /* function for pagination */
        list($result, $classObj, $dispyListInfo) = classPagination($paginationQuery, $intCount);
        $listData = listEvent($authorise, $intCount, $result);
        $strContent .= $listData;
        $strContent .= '<br /><br />';
        $strContent .= $dispyListInfo . '<br />';
        $strContent .= $classObj->navigationBar();
    } else {
        $strContent .= "No data is stored in the database or you are not authorised to view this data";
    }
    echo $strContent;
}
<div class="box box-primary">
          <div class="box-header"><i class="fa fa-bar-chart-o"></i><h3 class="box-title">Nombre d'heures de r&eacute;servation par jour pour le mois de <?php 
echo getMonth($month);
?>
  </h3></div>
<div class="box-body">
           <?php 
for ($i = 1; $i <= $nb_jour; ++$i) {
    $result = getStatResaByDay($year . '-' . $month . '-' . $i, $epn);
    //debug($result['duree']);
    $dataSet3->addPoint(new Point($i, $result['duree']));
    $maxBound[$i] = $result['duree'];
}
$maxValue = ceil(max($maxBound) / 60);
$chart3->setDataSet($dataSet3);
$chart3->setTitle("Detail des heures pour " . getMonth($month) . " " . $year . " ");
$chart3->getPlot()->getPalette()->setBarColor(array(new Color(128, 195, 28)));
$chart3->getPlot()->setLabelGenerator(new TimeLabelGenerator());
// arrondir la valeur maximale supérieure
$chart3->getBound()->setUpperBound($maxValue * 60);
//  $chart3->getTics()->quantizeTics(12);
$chart3->render("img/chart/" . $year . "/" . $namepn . "_resa-Mensuelle-" . $month . ".png");
?>
   <!-- rendu du graphique sous forme d'image-->      
	<img src="img/chart/<?php 
echo $year;
?>
/<?php 
echo $namepn;
?>
_resa-Mensuelle-<?php 
示例#14
0
文件: egress.php 项目: ndrd/cochinito
        $row .= "<th colspan='3'>" . getMonth($i) . "</th>";
        $row .= "</thead>";
        $row .= "<tbody>";
        #body
        for ($j = 0; $j < count($retI[$i]); $j++) {
            $row .= "<tr>";
            $row .= "<td style='background-color: #E7BAB6;'>- " . money_format('%(#5n', $retI[$i][$j][0]) . "</td>";
            $row .= "<td> Descripcion</td>";
            $row .= "<td><button class='remove' data-id='" . $retI[$i][$j][1] . "' value='remove' style='color:green;'>Quitar adeudo</button></td>";
            $row .= "</tr>";
        }
        $row .= "</tbody>";
        $row .= "</table>";
        $row .= "<div class='mdl-card__actions mdl-card--border'>";
        $row .= "<input id='ingresoFijo' class='monthlyInput'  type='text' name='amount' placeholder='100' style='color:black;'>";
        $row .= "<button style='color:red;' class='insertMonthly mdl-button mdl-js-button mdl-js-ripple-effect' data-idu='1'>Pagaste dinero en " . getMonth($i) . "</button>";
        $row .= "</div>";
        #button
        echo $row;
    }
}
?>



      </div>
    </div>
  
</div>

    <script>
示例#15
0
 /**
  * 週報(トレーナー、責任者)DB登録可否判定
  * 登録可能の場合、trueを返す
  *
  * @param
  */
 function isEntryEnabledFeedback($sql_flg, $staff_id, $term_id, $boss_id, $boss_flg, $data_type, $wm_flg)
 {
     $isEnabled = true;
     $sql = "SELECT COUNT(*) as cnt FROM `t_feedback` WHERE `staff_id` = :staff_id AND `term_id` = :term_id AND `data_type` = :data_type";
     $searchParam = array('staff_id' => $staff_id, 'term_id' => $term_id['id'], 'data_type' => $data_type);
     if ($boss_flg == 'trainer') {
         $searchParam['trainer_id'] = $boss_id;
         $sql .= ' AND `trainer_id` = :trainer_id';
     } elseif ($boss_flg == 'admin') {
         $searchParam['admin_id'] = $boss_id;
         $sql .= ' AND `admin_id` = :admin_id';
     }
     // データベースに接続する
     $conn = DbControl::getInstance();
     $conn->dbConnect(DbControl::SLAVE_DB);
     // クエリを実行する
     $res = $conn->dbExecFetch(DbControl::SLAVE_DB, $sql, $searchParam);
     if (isset($sql_flg) && !empty($sql_flg) && $sql_flg == 'insert') {
         if (isset($res) && $res['cnt'] > 0) {
             $isEnabled = false;
         } else {
             $isEnabled = true;
         }
     } elseif (isset($sql_flg) && !empty($sql_flg) && $sql_flg == 'update') {
         if (isset($res) && $res['cnt'] > 0) {
             if ($wm_flg == 'weekly') {
                 $tense = $this->tenseWeekly($term_id['id']);
             } elseif ($wm_flg == 'monthly') {
                 $target_year = getYear($this->request['target_date']);
                 $target_month = getMonth($this->request['target_date']);
                 $tense = tenseMonthly($target_year, $target_month);
             }
             if ($tense) {
                 $isEnabled = true;
             } else {
                 $isEnabled = false;
             }
         } else {
             $isEnabled = false;
         }
     }
     // データベースを切断する
     $conn->dbClose(DbControl::SLAVE_DB);
     return $isEnabled;
 }
示例#16
0
 /**
  * formのバリデーションチェック(テスト)
  * エラーがあるとtrueを返す
  *
  * @param
  */
 function formValidate($form, $data)
 {
     $error = array();
     //検索画面関連
     if (!isset($data['search_staff_cd'])) {
         $error[] = "検索時の社員CDが取得できませんでした。";
     }
     if (!isset($data['search_name'])) {
         $error[] = "検索時の社員名が取得できませんでした。";
     }
     if (!isset($data['search_department_cd'])) {
         $error[] = "検索時の本部CDが取得できませんでした。";
     }
     if (!isset($data['search_division_cd'])) {
         $error[] = "検索時の部CDが取得できませんでした。";
     }
     if (!isset($data['search_section_cd'])) {
         $error[] = "検索時の課・支店CDが取得できませんでした。";
     }
     if (!isset($data['search_target_year'])) {
         $error[] = "検索時の対象年が取得できませんでした。";
     }
     //初期遷移のみ
     if ($form == "edit") {
         //社員IDを確認
         if (!isset($data['edit_id'])) {
             $error[] = "編集対象の社員IDが取得できませんでした。";
         } elseif (emp($data['edit_id']) || !preg_match("/^\\d{1,10}\$/", $data['edit_id'])) {
             $error[] = "編集対象のIDが不正です。";
         }
         //初期遷移以外
     } else {
         //社員IDを確認
         if (!isset($data['id'])) {
             $error[] = "社員IDが取得できませんでした。";
         } elseif (emp($data['id']) || !preg_match("/^\\d+\$/", $data['id'])) {
             $error[] = "IDが不正です。";
         }
         //社員CDを確認
         if (!isset($data['staff_cd'])) {
             $error[] = "社員CDが取得できませんでした。";
         } elseif (!emp($data['staff_cd']) && !preg_match("/^\\d+\$/", $data['staff_cd'])) {
             $error[] = "社員CDが不正です。";
         }
         //対象年度を確認
         if (!isset($data['target_year'])) {
             $error[] = "対象年度が取得できませんでした。";
         } elseif (!emp($data['target_year']) && !preg_match("/^\\d{4}\$/", $data['target_year'])) {
             $error[] = "対象年度が不正です。";
         }
         //社員名を確認
         if (!isset($data['name'])) {
             $error[] = "社員名が取得できませんでした。";
         }
         //社員名カナを確認
         if (!isset($data['name_kana'])) {
             $error[] = "社員名カナが取得できませんでした。";
         }
         //性別を確認
         if (!isset($data['sex'])) {
             $error[] = "性別が取得できませんでした。";
         }
         //メールアドレスを確認
         if (!isset($data['mail'])) {
             $error[] = "メールアドレスが取得できませんでした。";
         } elseif (!emp($data['mail']) && !preg_match('|^([\\w])+([\\w\\._-])*\\@([\\w])+([\\w\\._-])*\\.([a-zA-Z])+$|', $data['mail'])) {
             $errors[] = "メールアドレスが不正です。";
         }
         //本部CDを確認
         if (!isset($data['department_cd'])) {
             $error[] = "本部CDが取得できませんでした。";
         }
         //部CDを確認
         if (!isset($data['division_cd'])) {
             $error[] = "部CDが取得できませんでした。";
         }
         //課・支店CDを確認
         if (!isset($data['section_cd'])) {
             $error[] = "課・支店CDが取得できませんでした。";
         }
         //職種CDを確認
         if (!isset($data['occupation_cd'])) {
             $error[] = "職種CDが取得できませんでした。";
         }
         //職種名を確認
         if (!isset($data['occupation'])) {
             $error[] = "職種名が取得できませんでした。";
         }
         /*
                     //社員CDを確認
                     if ( !isset($data['staff_cd']) && emp($data['staff_cd'])){
                         $error[] = "社員CDが取得できませんでした。";
                     } elseif( !preg_match("/^\d+$/", $data['staff_cd']) ) {
                         $error[] = "社員CDが不正です。";
                     }
         
                     //対象年度を確認
                     if ( !isset($data['target_year']) && emp($data['target_year']) ){
                         $error[] = "対象年度が取得できませんでした。";
                     } elseif( !preg_match("/^\d{4}$/", $data['target_year']) ) {
                         $error[] = "対象年度が不正です。";
                     }
         
                     //社員名を確認
                     if ( !isset($data['name']) && emp($data['name']) ){
                         $error[] = "社員名が取得できませんでした。";
                     }
         
                     //社員名カナを確認
                     if ( !isset($data['name_kana']) && emp($data['name_kana']) ){
                         $error[] = "社員名カナが取得できませんでした。";
                     }
         
                     //性別を確認
                     if ( !isset($data['sex']) && emp($data['sex']) ){
                         $error[] = "性別が取得できませんでした。";
                     }
         
                     //メールアドレスを確認
                     if ( !isset($data['mail']) && emp($data['mail']) ){
                         $error[] = "メールアドレスが取得できませんでした。";
                     } elseif ( !preg_match('|^[0-9a-z_./?-]+@([0-9a-z-]+\.)+[0-9a-z-]+$|', $data['mail']) ) {
                         $errors[] = "メールアドレスが不正です。";
                     }
         
                     //本部CDを確認
                     if ( !isset($data['department_cd']) && emp($data['department_cd']) ){
                         $error[] = "本部CDが取得できませんでした。";
                     }
         
                     //部CDを確認
                     if ( !isset($data['division_cd']) && emp($data['division_cd']) ){
                         $error[] = "部CDが取得できませんでした。";
                     }
         
                     //課・支店CDを確認
                     if ( !isset($data['section_cd']) && emp($data['section_cd']) ){
                         $error[] = "課・支店CDが取得できませんでした。";
                     }
         
                     //職種CDを確認
                     if ( !isset($data['occupation_cd']) && emp($data['occupation_cd']) ){
                         $error[] = "職種CDが取得できませんでした。";
                     }
         
                     //職種名を確認
                     if ( !isset($data['occupation']) && emp($data['occupation']) ){
                         $error[] = "職種名が取得できませんでした。";
                     }
         */
         //権限を確認
         if (isset($data['group_cd'])) {
             if (is_array($data['group_cd']) && in_array(ACCOUNT_NEW_EMP, $data['group_cd']) && count($data['group_cd']) > 1) {
                 $error[] = "新入社員権限は他の権限と併用できません。";
             }
         }
         //退職フラグを確認
         if (isset($data['retire_flg']) && !preg_match("/^\\d\$/", $data['retire_flg'])) {
             $error[] = "退職フラグ指定値が不正です。";
         }
         //件数分の判定処理
         $cnt = 0;
         for ($i = 0; $i < 3; $i++) {
             //トレーナー確認
             if (isset($data["department_cd_trainer{$i}"]) && !emp($data["department_cd_trainer{$i}"])) {
                 if (!isset($data["user_id_trainer{$i}"]) || emp($data["user_id_trainer{$i}"])) {
                     $error[] = "担当OJTトレーナー" . ($i + 1) . "人目の「トレーナー名」が選択されていません。";
                 }
             }
             //責任者確認
             /*
                             if( isset($data["department_cd_admin{$i}"]) && !emp( $data["department_cd_admin{$i}"] ) ){
                                 if( !isset($data["user_id_admin{$i}"]) || emp( $data["user_id_admin{$i}"] ) ){
                                     $error[] = "担当OJT責任者".($i+1)."人目の「責任者名」が選択されていません。";
                                 }
                             }
             */
             //責任者所属選択あり、責任者名選択なし/期間指定なし
             if (isset($data["department_cd_admin{$i}"]) && !emp($data["department_cd_admin{$i}"])) {
                 if (!isset($data["user_id_admin{$i}"]) || emp($data["user_id_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「責任者名」が選択されていません。";
                 }
                 if (!isset($data["start_date_admin{$i}"]) || emp($data["start_date_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」を入力されていません。";
                 }
                 if (!isset($data["end_date_admin{$i}"]) || emp($data["end_date_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」を入力されていません。";
                 }
             }
             //責任者紐付き期間確認
             //半角数字8桁・正しい日付けか
             if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"])) {
                 $year = getYear($data["start_date_admin{$i}"]);
                 $month = getMonth($data["start_date_admin{$i}"]);
                 $day = getDays($data["start_date_admin{$i}"]);
                 if (!preg_match("/^\\d{8}\$/", $data["start_date_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」は半角数字8桁で入力してください。";
                 } elseif (!checkdate($month, $day, $year)) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」が不正です。";
                 }
             }
             if (isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
                 $year = getYear($data["end_date_admin{$i}"]);
                 $month = getMonth($data["end_date_admin{$i}"]);
                 $day = getDays($data["end_date_admin{$i}"]);
                 if (!preg_match("/^\\d{8}\$/", $data["end_date_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」は半角数字8桁で入力してください。";
                 } elseif (!checkdate($month, $day, $year)) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」が不正です。";
                 }
             }
             if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"]) && isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
                 //開始日が終了日より過去か
                 if ($data["start_date_admin{$i}"] > $data["end_date_admin{$i}"]) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」は「担当終了日」より過去を入力してください。";
                 }
             }
             if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"]) || isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
                 //責任者所属選択なし、期間指定あり
                 if (!isset($data["department_cd_admin{$i}"]) || emp($data["department_cd_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の所属部署が選択されていません。";
                 }
                 //責任者名選択なし、期間指定あり
                 if (!isset($data["user_id_admin{$i}"]) || emp($data["user_id_admin{$i}"])) {
                     $error[] = "担当OJT責任者" . ($i + 1) . "人目の「責任者名」が選択されていません。";
                 }
             }
         }
     }
     // チェック結果を返す
     if (count($error) > 0) {
         return $error;
     } else {
         return false;
     }
 }
示例#17
0
        <option value="0">- wszystkie -</option>
        <?php 
    foreach ($this->month_year_select as $key => $value) {
        ?>
            <option 
                value="<?php 
        echo $value['month'] . '-' . $value['year'];
        ?>
"
                <?php 
        if ($this->month_year == $value['month'] . '-' . $value['year']) {
            echo ' selected';
        }
        ?>
            ><?php 
        echo getMonth($value['month']) . ' ' . $value['year'] . ' (' . $value['count'] . ')';
        ?>
</option>
        <?php 
    }
    ?>
    </select>
    <?php 
}
?>
    <?php 
if ($this->countOfFilteredArticles > 5) {
    ?>
    <label>Wpisów na stronie:</label>
    <select name="page_limit">
        <option value="5" <?php 
?>
</p>
		
		<hr>
		<strong><i class="fa fa-map-marker margin-r-5"></i> Adresse</strong>
            <p class="text-muted"><?php 
echo $row["adresse_user"];
?>
 <br><?php 
echo getCity($row["ville_user"]);
?>
</p>
		<hr>
		<strong><i class="fa fa-pencil margin-r-5"></i> Données personnelles</strong>
            <p class="text-muted">né(e) le <?php 
echo $row["jour_naissance_user"] . " " . getMonth($row["mois_naissance_user"]) . " " . $row["annee_naissance_user"];
?>
</p>
						<p class="text-muted"><i class="fa fa-phone margin-r-5"></i> <?php 
echo $row["tel_user"];
?>
</p>
						<p class="text-muted"><i class="fa fa-envelope margin-r-5"></i><?php 
echo $row["mail_user"];
?>
</p>
		
			
	
</div></div>
示例#19
0
function util_sysdatefmt_explode($date)
{
    $months = array("Jan" => 1, "Feb" => 2, "Mar" => 3, "Apr" => 4, "May" => 5, "Jun" => 6, "Jul" => 7, "Aug" => 8, "Sep" => 9, "Oct" => 10, "Nov" => 11, "Dec" => 12);
    $res = preg_match("/\\s*(\\d+)-(.+)-(\\d+) (\\d+):(\\d+)/", $date, $match);
    if ($res == 0) {
        //if it doesn't work try (Y-M-d) only
        $res = preg_match("/\\s*(\\d+)-(.+)-(\\d+)/", $date, $match);
        if ($res == 0) {
            // if it doesn't work try Y-M only
            $res = preg_match("/\\s*(\\d+)-(.+)/", $date, $match);
            if ($res == 0) {
                // if it doesn't work try YYYY only
                $res = preg_match("/\\s*(\\d+)/", $date, $match);
                if ($res == 0) {
                    // nothing is valid return Epoch time
                    $year = '1970';
                    $month = '1';
                    $day = '1';
                    $hour = '0';
                    $minute = '0';
                } else {
                    list(, $year) = $match;
                    $month = '1';
                    $day = '1';
                    $hour = '0';
                    $minute = '0';
                }
            } else {
                list(, $year, $month) = $match;
                $day = '1';
                $hour = '0';
                $minute = '0';
            }
        } else {
            list(, $year, $month, $day) = $match;
            $hour = '0';
            $minute = '0';
        }
    } else {
        list(, $year, $month, $day, $hour, $minute) = $match;
    }
    return array($year, getMonth($month, $ok), $day, $hour, $minute);
}
    //boucler sur les tarifs
    $rowtarifsNB = selectPrintTarif(0);
    while ($tarifn = mysqli_fetch_array($rowtarifsNB)) {
        $mNoir = $mNoir + getStatNCbyM($i, $year, $tarifn['id_tarif'], $epn);
    }
    //retrouver l'ensemble des tarifs pour la couleur
    $rowtarifscoul = selectPrintTarif(1);
    while ($tarifc = mysqli_fetch_array($rowtarifscoul)) {
        $mcouleur = $mcouleur + getStatNCbyM($i, $year, $tarifc['id_tarif'], $epn);
    }
    //calcul des totaux
    $totalNoirBlanc = $totalNoirBlanc + $mNoir;
    $totalcouleur = $totalcouleur + $mcouleur;
    $totalpages = $totalpages + $pagesimprime;
    $totalcredit = $totalcredit + $credit;
    echo '<tr><td align="right"><a href="">' . getMonth($i) . '</a></b>&nbsp;&nbsp;</td>
              <td >' . $pagesimprime . '</td>
			  <td>' . $credit . ' &euro;</td>
			<td>' . $mNoir . '</td>
			  <td>' . $mcouleur . '</td></tr>';
    //vider pour la suite
    $pagesimprime = '';
    $credit = '';
    $mNoir = '';
    $mcouleur = '';
}
?>
	<tr ><td>Totaux</td>
				<td ><?php 
echo $totalpages;
?>
示例#21
0
     if (strlen($period->period_month) == 1) {
         $period->period_month = '0' . $period->period_month;
     }
     $dateto = "{$period->period_year}-{$period->period_month}-31";
 }
 if ($periodfrom_id == 0) {
     $datefrom = "0000-01-01";
     $pdf->datefrom = "";
 } else {
     $pdf->datefrom = getMonth(str_replace("-", "", $datefrom), 0);
 }
 if ($periodto_id == 0) {
     $dateto = "9999-01-31";
     $pdf->dateto = "";
 } else {
     $pdf->dateto = getMonth(str_replace("-", "", $dateto), 1);
 }
 if ($pdf->datefrom == "") {
     $pdf->datefrom = $pdf->getBatchInfo(0);
 }
 if ($pdf->dateto == "") {
     $pdf->dateto = $pdf->getBatchInfo(1);
 }
 //$pdf->datefrom=$datefrom;
 //$pdf->dateto=$dateto;
 $acc->fetchAccounts($accounts_id);
 $balanceamt = $acc->accBalanceBFAmount($periodfrom_id, $accounts_id);
 if ((int) $balanceamt == 0) {
     $balanceamt = 0;
 }
 $pdf->headeraccounts_code = $acc->accountcode_full;
<?php

include "../include/fonction.php";
include "../connect_db.php";
//
$date = $_GET["date"];
$epn = $_GET["epn"];
$separator = ";";
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=caissedumois-" . $date . ".csv");
// Ligne entête
$csv_output = "Etat de caisse pour le mois de " . getMonth($date) . " " . date('Y');
$csv_output .= "\n";
$csv_output .= "date" . $separator . "nom" . $separator . "prenom" . $separator . "Tarif" . $separator . "Nombre" . $separator . "Encaissé" . $separator . "Caissier";
$csv_output .= "\n";
//Les impressions du jour
$db = mysqli_connect($host, $userdb, $passdb, $database);
$sql = "SELECT `print_date`,`print_debit`,`donnee_tarif`,`print_credit`, nom_user, prenom_user  ,print_userexterne,print_user,print_caissier\nFROM tab_print, tab_user , tab_tarifs \nWHERE MONTH(`print_date`)=" . $date . "\nAND print_statut=1 \nAND tab_print.`print_user`=tab_user.id_user \nAND tab_print.print_tarif=tab_tarifs.`id_tarif` \nAND print_epn=" . $epn . "\nORDER BY print_date ASC";
$resultprint = mysqli_query($db, $sql);
mysqli_close($db);
$nbprint = mysqli_num_rows($resultprint);
$total = 0;
//*** verification utilisateur externe
$db = mysqli_connect($host, $userdb, $passdb, $database);
$sql1 = "SELECT `id_user` FROM `tab_user` WHERE `nom_user`='Externe' AND `login_user`='compte_imprim' ";
$resultexterne = mysqli_query($db, $sql1);
mysqli_close($db);
if ($resultexterne == FALSE) {
    return FALSE;
} else {
    $row = mysqli_fetch_array($resultexterne);
示例#23
0
</FORM>

EOF;
    if ($_POST["viewpdf"] == "0") {
        $datefrom = $_POST['period_from'];
        $dateto = $_POST['period_to'];
        $accounts_codefrom = $_POST['accounts_codefrom'];
        $accounts_codeto = $_POST['accounts_codeto'];
        $datefrom = str_replace("-", "", getPeriodDate($datefrom));
        $dateto = str_replace("-", "", getPeriodDate($dateto));
        if ($datefrom != "") {
            $datefrom = getMonth($datefrom . "01", 0);
        }
        if ($dateto != "") {
            $dateto = getMonth($dateto . "01", 1);
        }
        if ($datefrom == "") {
            $datefrom = "0000-00-00";
        }
        if ($dateto == "") {
            $dateto = "9999-12-31";
        }
        //$pdf->datefromh = $datefrom;
        //$pdf->datetoh = $dateto;
        if ($_POST['accounts_codefrom'] == "") {
            $accounts_codefrom = "0000000";
        }
        if ($_POST['accounts_codeto'] == "") {
            $accounts_codeto = "9999999";
        }
示例#24
0
    $finance[1] = $outcome;
}
$smtp->free_result();
$smtp->close();
?>


<div class="container">
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>

    <?php 
for ($i = 1; $i < 13; $i++) {
    if (count($arrI[$i]) > 0 || count($arrE[$i]) > 0) {
        echo "<div class='row' style='padding:80px 0 0;'>" . "<table class='table'><thead><th>" . getMonth($i) . "</th></thead>" . "<tbody>" . "<div class='row'>" . "<div class='col-md-6'>" . "<table class='table'><thead><th style='color:green;'>Ingreso</th></thead>" . "<tbody>";
        for ($j = 0; $j < count($arrI[$i]); $j++) {
            echo "<td style='color:green;'>+ " . $arrI[$i][$j] . "</td>";
        }
        echo "</tbody>" . "</div>" . "<div class='col-md-6'>" . "<table class='table'><thead><th style='color:red;'>Egreso</th></thead>" . "<tbody>";
        for ($j = 0; $j < count($arrE[$i]); $j++) {
            echo "<td style='color:red;'>+ " . $arrE[$i][$j] . "</td>";
        }
        echo "</tbody>" . "</div>" . "</div>" . "</tbody>" . "</table>" . "</div>";
    }
}
?>

</div>

<?php 
示例#25
0
    public function showSearchForm($wherestr)
    {
        if ($this->issearch != "Y") {
            $this->quotation_no = "";
            $this->iscomplete = "null";
            $this->studentpayment_type = "";
            $this->studentpayment_category = "";
            if ($this->start_date == "") {
                $this->start_date = getMonth(date("Ymd", time()), 0);
            }
            if ($this->end_date == "") {
                $this->end_date = getMonth(date("Ymd", time()), 1);
            }
        }
        //iscomplete
        if ($this->iscomplete == "1") {
            $selectactiveY = "selected = 'selected'";
        } else {
            if ($this->iscomplete == "0") {
                $selectactiveN = "selected = 'selected'";
            } else {
                $selectactiveL = "selected = 'selected'";
            }
        }
        $selectCash = "";
        $selectCheque = "";
        $selectNull = "";
        if ($this->studentpayment_type == "C") {
            $selectCash = "SELECTED";
        } else {
            if ($this->studentpayment_type == "Q") {
                $selectCheque = "SELECTED";
            } else {
                $selectNull = "SELECTED";
            }
        }
        $selectTypeNull = "";
        $selectTypeI = "";
        $selectTypeO = "";
        if ($this->studentpayment_category == "I") {
            $selectTypeI = "SELECTED";
        } else {
            if ($this->studentpayment_category == "O") {
                $selectTypeO = "SELECTED";
            } else {
                $selectTypeNull = "SELECTED";
            }
        }
        //echo $this->iscomplete;
        echo <<<EOF
<form name="frmStudentpayment" action="studentpayment.php" method="POST">
\t</form>
\t<form name="frmSearch" action="studentpayment.php" method="POST">

\t<table>
\t<tr>
\t<td nowrap><input value="Reset" type="reset">
\t<input value="New" type="button" onclick="gotoAction('');"></td>
\t</tr>
\t</table>

\t<table border="0">
\t<input name="issearch" value="Y" type="hidden">
\t<input name="action" value="search" type="hidden">
\t<tr><th colspan="4">Criterial</th></tr>

    <tr>
    <td class="head">Date From (YYYY-MM-DD)</td>
    <td class="even">
    <input name='start_date' id='start_date' value="{$this->start_date}" maxlength='10' size='10'>
    <input name='btnDate' value="Date" type="button" onclick="{$this->startctrl}">
    </td>
    <td class="head">Date To (YYYY-MM-DD)</td>
    <td class="even">
    <input name='end_date' id='end_date' value="{$this->end_date}" maxlength='10' size='10'>
    <input name='btnDate' value="Date" type="button" onclick="{$this->endctrl}">
    </td>
    </tr>

\t<tr>
\t<td class="head">Payment No</td>
\t<td class="even" acolspan="3"><input name="studentpayment_no" value="{$this->studentpayment_no}"></td>
\t<td class="head">Student</td>
\t<td class="even">{$this->studentctrl}</td>
\t</tr>

\t<tr>
\t<td class="head">Student Name</td>
\t<td class="even"><input name="student_name" value="{$this->student_name}"></td>
\t<td class="head">Matrix No</td>
\t<td class="even"><input name="student_no" value="{$this->student_no}"></td>
\t</tr>

\t<tr style="display:none">
\t<td class="head">Session</td>
\t<td class="even">{$this->yearctrl} / {$this->sessionctrl}</td>
\t<td class="head">Semester</td>
\t<td class="even">{$this->semesterctrl}</td>
\t</tr>

    <tr>
    <td class="head">Course</td>
    <td class="even" colspan="3">{$this->coursectrl}</td>
    </tr>


\t<tr>
    <td class="head">Payment Type</td>
    <td class="even" acolspan="3">
    <select name="studentpayment_category">
    <option value="" {$selectTypeNull}>Null</option>
    <option value="I" {$selectTypeI}>By Invoice</option>
    <option value="O" {$selectTypeO}>Others</option>
    </select>
    </td>
    <td class="head">Payment Method</td>
    <td class="even" acolspan="3">
    <select name="studentpayment_type">
    <option value="" {$selectNull}>Null</option>
    <option value="C" {$selectCash}>Cash</option>
    <option value="Q" {$selectCheque}>Cheque</option>
    </select>
    </td>
\t</tr>

\t<tr>
    <td class="head">Is Complete</td>
    <td class="even" colspan="3">
    <select name="iscomplete">
    <option value="null" {$selectactiveL}>Null</option>
    <option value=1 {$selectactiveY}>Yes</option>
    <option value=0 {$selectactiveN}>No</option>
    </select>
    </td>
\t</tr>


\t<tr>
\t<th colspan="4"><input type="submit" aonclick="gotoAction('search');" value="Search" ></th>
\t</tr>

\t</table>
\t</form>
\t<br>
EOF;
    }
示例#26
0
                     $headersSum->{$record}['parent']->{$ref} += $plano_contas[$i]['dataTable']->{$ref};
                 }
             }
         }
         if ($plano_contas[$i]['tipo'] != 'A' && !count((array) $plano_contas[$i]['dataTable'])) {
             unset($plano_contas[$i]);
         }
         if ($plano_contas[$i]['tipo'] != 'A' && (strpos($record['mask'], $plano_contas[$i]['mask']) >= 0 || strlen((string) $record['cod']) != $lastCodSize) || $plano_contas[$i]['tipo'] == 'A' && count((array) $plano_contas[$i]['dataTable'])) {
             $data[] = $record;
             $lastCodSize = strlen((string) $record['cod']);
             $lastCod = $record['mask'];
         }
     }
     $tree = buildTree($data);
     getMonth(1, $tree[0]);
     getMonth(2, $tree[0]);
     echo json_encode($tree);
     for ($i = 0; $i < sizeof($data); $i++) {
         $r = $data[$i];
         //echo $r['mask'] . "," . $r['plano'] . ",". $r['saldo'] . ",". $r['jan'] .",". $r['fev'] .",". $r['mar'] .",". $r['abr'] .",". $r['mai'] .",". $r['jun'] .",". $r['jul'] .",". $r['ago'] ."\n";
     }
     /*echo json_encode(
     			array(
     				"success" => empty($mysqli->error),
     				"error" => $mysqli->error,
     				"data" => $newdata
     			)
     		);*/
     break;
 case "getExtrato":
     $fonte = addslashes($_GET['fonte']);
示例#27
0
$PAGE = "S_REPORT_MONTHLY_EDIT";
require_once '../_init_auth.php';
require_once 'report/class.Report.php';
require_once 'target/class.Target.php';
try {
    $param['page'] = $PAGE;
    $report = new report($request);
    $target = new target($request);
    //日付取得
    if (isset($request['target_date']) && !empty($request['target_date'])) {
        //サブメニューから遷移
        $date = date('Ymd', strtotime($request['target_date']));
        $termid = getTermId($date);
        $param['date'] = $date;
        $year = getYear($request['target_date']);
        $month = getMonth($request['target_date']);
        $month = sprintf('%01d', $month);
        $param['target_date'] = $date;
    } else {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
    }
    //新入社員情報取得
    if (isset($request['id'])) {
        $employee = $report->getEmpData($request['id']);
    } else {
        $param['errors'][] = "システムエラーが発生しました。";
        renderTemplate('error.tpl', $param);
        exit;
    }
示例#28
0
                <br>Type of order:
                <br><input type="checkbox" id="chk_cust_graphic">Graphic</input>
                <br><input type="checkbox" id="chk_cust_typeset">Type settings</input>
                <br><input type="checkbox" id="chk_cust_webdesign">Web design</input>
                <br>Due date:
                <br><select id="sel_dueyear">
                    <?php 
for ($i = 2014; $i < 2050; $i++) {
    echo '<option value="' . $i . '">' . $i . '</option>';
}
?>
                </select>
                <select id="sel_duemonth">
                    <?php 
for ($i = 1; $i < 13; $i++) {
    echo '<option value="' . $i . '">' . getMonth($i) . '</option>';
}
?>
                </select>
                <select id="sel_dueday">
                    <?php 
for ($i = 1; $i < 32; $i++) {
    echo '<option value="' . $i . '">' . $i . '</option>';
}
?>
                </select>
                <br>Description :
                <br><textarea id="text_cust_desc" row="30" col="5"></textarea></br>
                <br>
                <input type="button" value="Create order" onclick="createOrder()"></input>
                <input type="button" value="Close" onclick="closeNewOrder()" style="right: 10px"></input>
    echo getCyberName($epn);
    ?>
)</h3></div>
<div class="box-body"><table class="table"> 
				<thead><tr>
					<th></th>
					<th>Nouveaux inscrits</th>
					<th>Dont actifs</th></td></tr></thead></tbody>
<?php 
    for ($i = 1; $i <= $month; ++$i) {
        $nbNewAdhActifs = statInscription($i, 1, $epn);
        $nbNewAdhInactifs = statInscription($i, 2, $epn);
        //debug($nbNewAdhInactifs);
        $totalNewadh = $nbNewAdhActifs + $nbNewAdhInactifs;
        //debug($nbNewAdh);
        echo '<tr><td >' . getMonth($i) . '</td>
              <td >' . $totalNewadh . '</td>
              <td >' . $nbNewAdhActifs . ' (' . getPourcent($nbNewAdhActifs, $nbTotal) . ')</td></tr>';
    }
    ?>
</TBODY></table>
</div></div>


<?php 
} else {
    echo geterror(36);
}
?>

示例#30
0
     getgroupMobile();
     break;
 case "getgroupFortool":
     getgroupFortool();
     break;
 case "getunit":
     getunit();
     break;
 case "getdosageformFetch":
     getDosageForm();
     break;
 case "getRouteofAdminName":
     RouteofAdminNamelist();
     break;
 case "getMonth":
     getMonth($lang);
     break;
 case "getMonthByFrequencyId":
     getMonthByFrequencyId();
     break;
 case "getMonthMobile":
     getMonthMobile();
     break;
 case "getYear":
     getYear();
     break;
 case "getYearMobile":
     getYearMobile();
     break;
 case "getItemlistwithstrength":
     getItemlistwithstrength();