function __construct()
 {
     $this->dom = new DOMDocument();
     $this->methods = function ($p, $n, $arg) {
         if (!isIn($n, array('loadHTML', 'loadXML'))) {
             return 0;
         }
         $p->dom->{$n}($arg[0]);
     };
 }
function bullet($u, $tp)
{
    global $bullet;
    foreach ($u as $v) {
        if (isIn($v, $bullet)) {
            $t = $v;
            $u = _drw($u)->remove($v)->O;
            break;
        }
    }
    $c = cEle($tp, array('type' => isset($t) ? $t : null));
    foreach ($u as $v) {
        $a = isStr($v) || isDrw($v) ? li($v) : $v;
        $c->addChild($a);
    }
    return $c;
}
<?php

session_start();
require_once "../include.php";
if (!isIn() || !isTeacher()) {
    header("Location: ../");
    exit;
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Forex Trading Simulator - View Currency Change Values</title>
        <style>
            table, th, td {
                border: 1px solid black;
                border-collapse: collapse;
            }
            th, td {
                padding: 5px;
                text-align:center;
            }
            p
            {
                text-align:center;
            }
        </style>
        <?php 
global $mysqlusername, $mysqlpassword, $mysqldatabase, $mysqllocation;
$db = new mysqli($mysqllocation, $mysqlusername, $mysqlpassword, $mysqldatabase);
<?php

session_start();
require_once "../include.php";
if (!isIn()) {
    die;
}
$gameEnded = gameEnded();
global $mysqlusername, $mysqlpassword, $mysqldatabase, $mysqllocation;
$db = new mysqli($mysqllocation, $mysqlusername, $mysqlpassword, $mysqldatabase);
purgeDatabase();
$query = "SELECT shortname, name FROM currency WHERE currencyid = 1 LIMIT 1";
$result = $db->query($query) or die($db->error);
while ($row = $result->fetch_assoc()) {
    $basecurrabbv = $row["shortname"];
    $basecurrname = $row["name"];
}
$userkey = intval($_SESSION["userkey"]);
if ($userkey <= 0) {
    return;
}
$query = "SELECT name, networth FROM users WHERE userkey={$userkey} LIMIT 1";
$result = $db->query($query) or die;
$totalvalue = 0;
if ($row = $result->fetch_assoc()) {
    echo "<p>Hello, " . $row["name"] . ".";
    $totalvalue = $row["networth"];
}
if (!$gameEnded) {
    echo " Your net worth is " . $basecurrabbv . number_format($totalvalue, 2) . ".</p>";
} else {
    print "<TABLE class='header_centro' border='0' cellpadding='5' cellspacing='0' align='center' width='100%' bgcolor='" . $cor . "'>";
    print "<TR class='header'>";
    print "<TD>" . TRANS('OCO_DATE', 'Data') . "</TD><TD>" . TRANS('OCO_NOTICE', 'Aviso') . "</TD><TD>" . TRANS('OCO_RESP', 'Responsável') . "</TD><TD>" . TRANS('OCO_TOAREA', 'Para área') . "</TD>";
    $j = 2;
    while ($resposta = mysql_fetch_array($resultado)) {
        if ($j % 2) {
            $trClass = "lin_par";
        } else {
            $trClass = "lin_impar";
        }
        $j++;
        print "<TR class='" . $trClass . "'>";
        print "<TD  class='line'>" . formatDate($resposta['data']) . "</TD>";
        print "<TD class='line'>" . nl2br($resposta['avisos']) . "</TD>";
        print "<TD class='line'>" . $resposta['login'] . "</TD>";
        if (isIn($resposta['sis_id'], $uareas)) {
            $area_aviso = $resposta['sistema'];
        } else {
            $area_aviso = "" . TRANS('OCO_ALL_AREAS', 'TODAS') . "";
        }
        print "<TD class='line'>" . $area_aviso . "</TD>";
        print "</TR>";
    }
    print "</TR>";
    print "</TABLE>";
    print "</TD>";
    print "</TR>";
    print "</TABLE>";
}
print "</TR>";
print "</TABLE>";
示例#6
0
 function push($m)
 {
     $a = func_get_args();
     $f = $a[0];
     if (!isIn($f, array('replace', 'byIndex', 'auto', 'distinct', 'begin'))) {
         $f = 'auto';
     } else {
         mov_next($a);
     }
     while (list($i, $v) = each($a)) {
         push($this->O, $f, $v);
     }
     return $this;
 }
示例#7
0
 if (isset($_POST['operador'])) {
     if (!empty($_POST['operador']) && $_POST['operador'] != -1) {
         $query .= " AND o.operador=" . $_POST['operador'] . " ";
     }
 }
 if (isset($_POST['local'])) {
     if (!empty($_POST['local']) && $_POST['local'] != -1) {
         $query .= " AND o.local=" . $_POST['local'] . " ";
     }
 }
 if (isset($_POST['area'])) {
     if (!empty($_POST['area']) && $_POST['area'] != -1 && ($_SESSION['s_nivel'] == 1 || isIn($_POST['area'], $_SESSION['s_uareas']))) {
         $query .= " AND o.sistema=" . $_POST['area'] . " ";
     }
 } else {
     if ($_SESSION['s_nivel'] != 1 && !isIn($_POST['area'], $_SESSION['s_uareas'])) {
         print "<script>window.alert('" . TRANS('MSG_CONSULT_FOR_YOU_AREA') . "');</script>";
         print "<script>history.back();</script>";
         exit;
     }
 }
 if (!isset($_POST['d_ini']) || !isset($_POST['d_fim'])) {
     print "<script>window.alert('" . TRANS('MSG_PERIOD_INFO') . "'); history.back();</script>";
 } else {
     $d_ini_nova = converte_dma_para_amd(str_replace("-", "/", $_POST['d_ini']));
     $d_fim_nova = converte_dma_para_amd(str_replace("-", "/", $_POST['d_fim']));
     $d_ini_completa = $d_ini_nova . $hora_inicio;
     $d_fim_completa = $d_fim_nova . $hora_fim;
     if ($d_ini_completa <= $d_fim_completa) {
         //$dias_va  //Alterado de data_abertura para data_fechamento -- ordena mudou de fechamento para abertura
         $query .= " AND o.data_fechamento >= '" . $d_ini_completa . "' and o.data_fechamento <= '" . $d_fim_completa . "' and " . "o.data_atendimento is not null order by o.data_abertura";
function validate_and_insert_data($xml)
{
    $mysqli = new mysqli("localhost", "sec_user", "Uzg82t=u%#bNgPJw", "GPA_Tracker");
    $user = $_SESSION['userID'];
    $coursesSet = false;
    foreach ($xml->database[0]->children() as $table_data) {
        foreach ($table_data->children() as $rows) {
            if ($table_data['name'] == 'StudentData') {
                if ($rows->field[1] != $user) {
                    return false;
                }
            } else {
                if ($table_data['name'] == 'StudentCourse') {
                    if ($rows->field[8] != $user) {
                        return false;
                    }
                    $stmt = $mysqli->prepare("INSERT INTO StudentCourse (grade, weight, relevance, studentCourseID, semester, year, courseInfoID, selected, userID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\n                                          ON DUPLICATE KEY UPDATE grade=VALUES(grade), weight=VALUES(weight), relevance=VALUES(relevance)");
                    $stmt->bind_param('sssssssss', $rows->field[0], $rows->field[1], $rows->field[2], $rows->field[3], $rows->field[4], $rows->field[5], $rows->field[6], $rows->field[7], $user);
                    $stmt->execute();
                } else {
                    if ($table_data['name'] == 'StudentMajor') {
                        if ($rows->field[0] != $user) {
                            return false;
                        }
                        $stmt = $mysqli->prepare("INSERT INTO StudentMajor (userID, majorID, declaredDate) VALUES (?, ?, ?)\n                                          ON DUPLICATE KEY UPDATE declaredDate=VALUES(declaredDate)");
                        $stmt->bind_param('ssss', $user, $rows->field[1], $rows->field[2]);
                        $stmt->execute();
                    } else {
                        if ($table_data['name'] == 'AssessmentType') {
                            if (!$coursesSet) {
                                $stmt = $mysqli->prepare("SELECT studentCourseID\n\t\t\t\t\tFROM StudentCourse\n\t\t\t\t\tWHERE userID=?");
                                $stmt->bind_param('s', $user);
                                $stmt->execute();
                                $stmt->bind_result($studentCourse);
                                $courseList = array();
                                while ($stmt->fetch()) {
                                    array_push($courseList, $studentCourse);
                                }
                                $coursesSet = true;
                            }
                            if (!isIn($rows->field[2], $courseList)) {
                                return false;
                            }
                            $stmt = $mysqli->prepare("INSERT INTO AssessmentType (assessmentName, percentage, studentCourseID, assessmentTypeID) VALUES (?, ?, ?, ?)\n                                          ON DUPLICATE KEY UPDATE assessmentName=VALUES(assessmentName), percentage=VALUES(percentage)");
                            $stmt->bind_param('ssss', $rows->field[0], $rows->field[1], $rows->field[2], $rows->field[3]);
                            $stmt->execute();
                        } else {
                            if ($table_data['name'] == 'Assessment') {
                                if (!$coursesSet) {
                                    $mysqli = new mysqli("localhost", "sec_user", "Uzg82t=u%#bNgPJw", "GPA_Tracker");
                                    $stmt = $mysqli->prepare("SELECT studentCourseID\n\t\t\t\t\tFROM StudentCourse\n\t\t\t\t\tWHERE userID=?");
                                    $stmt->bind_param('s', $user);
                                    $stmt->execute();
                                    $stmt->bind_result($studentCourse);
                                    $courseList = array();
                                    while ($stmt->fetch()) {
                                        array_push($courseList, $studentCourse);
                                    }
                                    $coursesSet = true;
                                }
                                if (!isIn($rows->field[3], $courseList)) {
                                    return false;
                                }
                                $stmt = $mysqli->prepare("INSERT INTO Assessment (assessmentTypeID, grade, assessmentID, studentCourseID) VALUES (?, ?, ?, ?)\n                                          ON DUPLICATE KEY UPDATE assessmentTypeID=VALUES(assessmentTypeID), grade=VALUES(grade)");
                                $stmt->bind_param('ssss', $rows->field[0], $rows->field[1], $rows->field[2], $rows->field[3]);
                                $stmt->execute();
                            }
                        }
                    }
                }
            }
        }
    }
    return true;
}
示例#9
0
        print "</td>";
        print "<TR class='header'><td class='line'>" . TRANS('OCO_DATE') . "</TD><td class='line'>" . TRANS('OCO_NOTICE') . "</TD><td class='line'>" . TRANS('OCO_RESP') . "</td><td class='line'>" . TRANS('OCO_AREA') . "</TD>";
        print "<td class='line'>" . TRANS('COL_PRIORITY') . "</TD><td class='line'>" . TRANS('COL_EDIT') . "</TD><td class='line'>" . TRANS('COL_DEL') . "</TD></TR>";
        $j = 2;
        while ($row = mysql_fetch_array($resultado)) {
            if ($j % 2) {
                $trClass = "lin_par";
            } else {
                $trClass = "lin_impar";
            }
            $j++;
            print "<tr class=" . $trClass . " id='linhax" . $j . "' onMouseOver=\"destaca('linhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\"  onMouseDown=\"marca('linhax" . $j . "','" . $_SESSION['s_colorMarca'] . "');\">";
            print "<td class='line'>" . datab($row['data']) . "</td>";
            print "<td class='line'>" . $row['avisos'] . "</td>";
            print "<td class='line'>" . $row['nome'] . "</td>";
            if (isIn($row['sis_id'], $uareas)) {
                $area = $row['sistema'];
            } else {
                $area = "TODAS";
            }
            print "<td class='line'>" . $area . "</TD>";
            print "<td class='line'>" . $row['status'] . "</TD>";
            print "<td class='line'><a onClick=\"redirect('" . $_SERVER['PHP_SELF'] . "?action=alter&cellStyle=true&aviso_id=" . $row['aviso_id'] . "')\"><img height='16' width='16' src='" . ICONS_PATH . "edit.png' title='" . TRANS('HNT_EDIT') . "'></a></td>";
            print "<td class='line'><a onClick=\"javascript:confirmaAcao('" . TRANS('MSG_DEL_REG') . "','avisos.php','action=excluir&aviso_id=" . $row['aviso_id'] . "');\"><img height='16' width='16' src='" . ICONS_PATH . "drop.png' title='" . TRANS('HNT_DEL') . "'></TD>";
            print "</TR>";
        }
    }
} else {
    if (isset($_GET['action']) && $_GET['action'] == "incluir" && empty($_POST['submit'])) {
        print "<BR><B>" . TRANS('TLT_INSERT_BOARD_NOTICE') . "</B><BR>";
        print "<TR>";
示例#10
0
     $VARS['%editor%'] = $rowfull['nome'];
     $VARS['%aberto_por%'] = $rowfull['aberto_por'];
     $VARS['%problema%'] = $rowfull['problema'];
     $VARS['%solucao%'] = '';
     $VARS['%versao%'] = VERSAO;
     $qryconfmail = "SELECT * FROM mailconfig";
     $execconfmail = mysql_query($qryconfmail) or die(TRANS('ERR_QUERY'));
     $rowconfmail = mysql_fetch_array($execconfmail);
     if (isset($_POST['mailAR']) || isIn($_SESSION['s_area'], $rowconf['conf_custom_areas'])) {
         $event = 'abertura-para-area';
         $qrymsg = "SELECT * FROM msgconfig WHERE msg_event like ('" . $event . "')";
         $execmsg = mysql_query($qrymsg) or die(TRANS('ERR_QUERY'));
         $rowmsg = mysql_fetch_array($execmsg);
         send_mail($event, $rowSis['sis_email'], $rowconfmail, $rowmsg, $VARS);
     }
     if (isset($_POST['mailOP']) || isIn($_SESSION['s_area'], $rowconf['conf_custom_areas'])) {
         $event = 'abertura-para-operador';
         $qrymsg = "SELECT * FROM msgconfig WHERE msg_event like ('" . $event . "')";
         $execmsg = mysql_query($qrymsg) or die(TRANS('MSG_ERR_MSCONFIG'));
         $rowmsg = mysql_fetch_array($execmsg);
         $sqlMailOper = "select * from usuarios where user_id =" . $_POST['foward'] . "";
         $execMailOper = mysql_query($sqlMailOper);
         $rowMailOper = mysql_fetch_array($execMailOper);
         $VARS['%operador%'] = $rowMailOper['nome'];
         send_mail($event, $rowMailOper['email'], $rowconf, $rowmsg, $VARS);
     }
     $aviso .= "" . TRANS('MSG_SUCCESS_OPENCALL', 'Ocorrência registrada com sucesso!') . "!&nbsp;" . "" . TRANS('OCO_FIELD_NUMBER', 'Número') . ":&nbsp;<font color=red>" . $numero . "</font><BR><br>" . "<a href='atender.php?numero=" . $numero . "'>" . TRANS('OCO_ACT_ASWER', 'Atender') . "</a><br><br>" . "<a href='encaminhar.php?numero=" . $numero . "'>" . TRANS('OCO_ACT_EDIT_REDIR', 'Encaminhar/Editar') . "</a><br><br>" . "<a href='encerramento.php?numero=" . $numero . "'>" . TRANS('OCO_ACT_CLOSE', 'Encerrar') . "</a><br><br>";
     $i = 0;
 }
 if ($rowqryD['sis_atende'] == 1) {
     $_SESSION['aviso'] = $aviso;
 function create($m = null, $n = null)
 {
     $a = new DRW(func_get_args());
     while (list($i1, $v) = $a->each($l)) {
         if (isDrw($v)) {
             foreach ($v as $i => $v1) {
                 if ($i == 'type') {
                     unset($a->O[$i1][$i]);
                 }
             }
         }
     }
     $tp = 'input';
     if (!isIn($this->type, array('textarea', 'select', 'label', 'fieldset', 'legend', 'optgroup', 'option'))) {
         $a->push(array('type' => $this->type));
     } else {
         $tp = $this->type;
     }
     return Form::create($tp, $a->O);
 }
示例#12
0
 $sistem = "home.php";
 $marca = "HOME";
 //if (($_SESSION['s_ocomon']==1) && ($_SESSION['s_area'] != $rowconf['conf_ownarea'])) {
 if ($_SESSION['s_ocomon'] == 1 && !isIn($_SESSION['s_area'], $rowconf['conf_ownarea_2'])) {
     print "<li id='OCOMON'><a onMouseOver=\"destaca('OCOMON')\" onMouseOut=\"libera('OCOMON')\" onclick=\"loadIframe('menu.php?sis=o','menu','" . $ocoDirPath . "abertura.php','centro',2,'OCOMON')\">&nbsp;" . TRANS('MNS_OCORRENCIAS') . "&nbsp;</a></li>";
     if ($sis == "") {
         $sis = "sis=o";
     }
     $sisPath = $ocoDirPath;
     $sistem = "abertura.php";
     $marca = "OCOMON";
     //$home = "home=true";
 } else {
     // incluir para usuario simples.
     //if (($_SESSION['s_ocomon']==1) && ($_SESSION['s_area'] == $rowconf['conf_ownarea'])) {
     if ($_SESSION['s_ocomon'] == 1 && isIn($_SESSION['s_area'], $rowconf['conf_ownarea_2'])) {
         print "<li id='OCOMON' ><a onMouseOver=\"destaca('OCOMON')\" onMouseOut=\"libera('OCOMON')\" onclick=\"loadIframe('menu.php?sis=s','menu','" . $ocoDirPath . "abertura_user.php?action=listall','centro',3,'OCOMON')\">&nbsp;" . TRANS('MNS_OCORRENCIAS') . "&nbsp;</a></li>";
         $sis = "sis=s";
         $sisPath = $ocoDirPath;
         $sistem = "abertura_user.php?action=listall";
         $marca = "OCOMON";
     } else {
         print "<li>&nbsp;" . TRANS('MNS_OCORRENCIAS') . "&nbsp;</li>";
     }
 }
 if ($_SESSION['s_invmon'] == 1) {
     print "<li id='INVMON'><a onMouseOver=\"destaca('INVMON')\" onMouseOut=\"libera('INVMON')\" onclick=\"loadIframe('menu.php?sis=i','menu','" . $invDirPath . "abertura.php','centro',2,'INVMON')\">&nbsp;" . TRANS('MNS_INVENTARIO') . "&nbsp;</a></li>";
     //abertura.php   -   ".$invDirPath."".$invHome."
     if ($sis == "") {
         $sis = "sis=i";
     }