Ejemplo n.º 1
0
/**
 * Date: 08-Dec-14
 * Time: 5:24 PM
 */
function pr($obj, $label = '')
{
    echo "<hr><b>" . $label . ":</b>";
    //echo "<pre>";
    $tableObject = false;
    if (is_array($obj)) {
        foreach ($obj as $key => $value) {
            if ($value instanceof TableObject) {
                $tableObject = true;
            }
            break;
        }
    }
    if ($tableObject) {
        pEcho("Total Objects: " . count($obj));
        foreach ($obj as $key => $value) {
            $value->pr();
        }
    } else {
        var_dump($obj);
    }
    //echo "</pre><hr>";
}
Ejemplo n.º 2
0
// autoInsertFee_voucher_datail();
?>

    <a href="<?php 
echo $_SERVER['REQUEST_URI'];
?>
?correct=true" class="dangerLink">Auto Correct Vouchers</a>

<?php 
if (isset($_GET['correct']) && $_GET['correct'] == 'true') {
    $students = Student::findAll();
    $count = 1;
    foreach ($students as $stId => $student) {
        $class = new Clas($student->class_id->val);
        //if( $student->annual_dues->val < $class->config()->annual_dues->val ){
        //            $student->pr($count); $count ++;
        $vouchers = $student->getChildRecs('Fee_voucher');
        foreach ($vouchers as $voucher) {
            //if( $db->delete("fee_voucher_datails","fee_voucher_id=".$voucher->id->val)){ prlq(); }
            $details = $voucher->getChildRecs('Fee_voucher_datail');
            if (empty($details)) {
                if ($voucher->autoInsertFee_voucher_datail()) {
                    pEcho("Inserted...");
                }
            }
        }
        //}
    }
    $session->setMessage("Vouchers Corrected.", "success");
    redirect("../index.php");
}
Ejemplo n.º 3
0
<?php

require_once __DIR__ . "/../html_components/require_comps_start.php";
if (Log_messag::saveLog("Test action performed")) {
    pEcho("saved");
} else {
    pEcho("faild to save");
}