Example #1
0
#!/usr/bin/php
<?php 
define('DOCUMENT_ROOT', dirname(__FILE__));
require_once DOCUMENT_ROOT . '/bootstrap.php';
$bootstrap = new Bootstrap();
$bootstrap->boot();
$argsize = count($argv);
if ($argsize == 1) {
    echo colorize("Welcome to Mud - Movim Unified Doer\n\nHere some requests you can do with me :", 'green') . "\n- " . colorize("getloc", 'yellow') . "    grab all the translations in Movim and generate a global locale file\n- " . colorize("comploc", 'yellow') . "   compile the current locales to a simple PHP array to boost Movim execution\n- " . colorize("comptz", 'yellow') . "    compile the timezones\n- " . colorize("db", 'yellow') . "        create/update the database\n- " . colorize("config", 'yellow') . "    set the configuration of Movim (separated by commas and colons) eg. info:Test,description:Hop\n        ";
} elseif ($argsize == 2) {
    switch ($argv[1]) {
        case 'getloc':
            getloc();
            break;
            /*case 'comploc':
              comploc();
              break;*/
        /*case 'comploc':
          comploc();
          break;*/
        case 'comptz':
            comptz();
            break;
        case 'config':
            echo colorize("You need to pass an argument", 'red');
            break;
        case 'db':
            $md = Modl\Modl::getInstance();
            $infos = $md->check();
            if ($infos == null) {
                echo colorize("Nothing to do\n", 'green');
Example #2
0
File: ajax.php Project: qtgye/pms
}
if ($action == "edit_budget") {
    $hk_id_query = fp_hk_id($hk_id);
    $hk_result = mysql_query($hk_id_query);
    while ($hk_row = mysql_fetch_array($hk_result, MYSQL_ASSOC)) {
        // var_dump($hk_row);
        $loc = $hk_row['loc'];
        $dept = $hk_row['dept'];
        $hk_budget = number_format($hk_row['budget'], 2);
        $hk_expenses = number_format($hk_row['actual_budget'], 2);
        $mos = $hk_row['mos'];
        $yr = $hk_row['yr'];
        $year = get_year_by_id($yr);
    }
    $mos_def = getmonth($mos);
    $loc_def = getloc($loc);
    $dept_def = getdept($dept);
    $emp_querys = emp_querys($eid, null);
    // echo $emp_querys;
    $emp_result = mysql_query($emp_querys);
    while ($emp_row = mysql_fetch_array($emp_result, MYSQL_ASSOC)) {
        $last = $emp_row['last'];
        $first = $emp_row['first'];
        $middle = $emp_row['middle'];
        $pos = $emp_row['position'];
        $name = $last . ", " . $first . " " . $middle;
    }
    $body = '<div class="box-content responsive" style="font-size: 12px;">
					<center>
					<h3>' . $loc_def . '(' . $dept_def . ')' . '</h3></center><br>
						<form id="defaultForm" method="post" class="form-horizontal">