示例#1
0
 function list_countries()
 {
     $query = $this->con->genericQuery("select * from " . $this->table . " order by name");
     $objReturn = array();
     foreach ($query as $value) {
         $country = new country();
         $country->open($value);
         $objReturn[] = $country;
     }
     return $objReturn;
 }
示例#2
0
<?php

require_once "../config.php";
$discAdd = false;
$discUpd = false;
$discDel = false;
if (!$_GET['user']) {
    die;
} else {
    $idUser = $_GET['user'];
}
$country = new country();
$country->open($company->fk_country);
$newUser = new user();
$newUser->open($idUser);
if ($_POST['action'] == 'Save') {
    if (isset($_POST['hdId'])) {
        $newUser->saveDiscplines($_POST['hdId'], $_POST['discPrices']);
        $discUpd = true;
    }
}
?>

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <link rel="shortcut icon" href="../img/icon.png">
        <title>Disciplines | FOLearn</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="description" content="" />
示例#3
0
function showInvoices($fk_company, $dtStart, $dtEnd, $idCountry)
{
    $country = new country();
    $country->open($idCountry);
    $pay = new payment();
    $data = array();
    $i = 0;
    $list_invoices = $pay->getByDate($fk_company, $dtStart, $dtEnd);
    $html .= '<table id="datatables" class="table table-bordered table-striped responsive">';
    $html .= '   <thead>';
    $html .= '       <tr>';
    $html .= '           <th class="head0">#</th>';
    $html .= '           <th class="head1">Date Start</th>';
    $html .= '           <th class="head0">Date End</th>';
    $html .= '           <th class="head1">Lessons</th>';
    $html .= '           <th class="head0">Invoice</th>';
    $html .= '           <th class="head1">Actions</th>';
    $html .= '       </tr>';
    $html .= '   </thead>';
    $html .= '   <tbody>';
    foreach ($list_invoices as $value) {
        $i = $i + 1;
        $html .= '       <tr src="stays">';
        $html .= '           <td>' . $value->sequence . '</td>';
        $html .= '           <td>' . date('Y-m-d', strtotime($value->date_start)) . '</td>';
        $html .= '           <td>' . date('Y-m-d', strtotime($value->date_end)) . '</td>';
        $html .= '           <td>' . $value->lessons . '</td>';
        $html .= '           <td>(' . $country->currency . ') ' . $value->invoice . '</td>';
        $html .= '           <td><a href="/pages/invoice-detail.php?id=' . $value->id . '" role="button" class="btn btn-link">View</a></td>';
        $html .= '       </tr>';
    }
    $html .= '   </tbody>';
    $html .= '</table>';
    $data['html'] = $html;
    $data['count'] = $i;
    echo json_encode($data);
}