コード例 #1
0
ファイル: metricas_prod.php プロジェクト: C0l0ch0/BPV_WAU
function getData($name, $nombre1, $integrador, $producto)
{
    $dataArray = "";
    $fecha = date('H');
    $dia = date('d', strtotime("+1 day"));
    try {
        $conexion = new MySQL(0);
        $query0 = '	select hour(date_add(NOW(), INTERVAL -' . HOURDB . ' hour));';
        $result0 = $conexion->consulta($query0);
        $exec0 = $conexion->fetch_row($result0);
        $fecha = $exec0[0];
        $query = 'CALL GetProductChargeToday("' . strtolower($name) . '",' . HOURDB . "," . $integrador . ',' . $producto . ');';
        $result = $conexion->consulta($query);
        $conexion->prepareNextResult();
        $query1 = 'CALL GetProductChargeYesterday("' . strtolower($name) . '",' . HOURDB . "," . $integrador . ',' . $producto . ');';
        $result1 = $conexion->consulta($query1);
        $conexion->prepareNextResult();
        $query2 = 'CALL GetProductChargeProm("' . strtolower($name) . '",' . HOURDB . "," . $integrador . ',' . $producto . ');';
        $result2 = $conexion->consulta($query2);
        $conexion->prepareNextResult();
        if (!$result or !$result1 or !$result2) {
            throw new Exception("No se logro obtener informacion de cobros....\n");
        } else {
            $cont = 0;
            $hoy = $conexion->fetch_row($result);
            $ayer = $conexion->fetch_row($result1);
            $prom = $conexion->fetch_row($result2);
            while ($cont <= $fecha) {
                if ($ayer[1] == $cont) {
                    $valor = $ayer[0];
                    $ayer = $conexion->fetch_row($result1);
                } else {
                    $valor = 0;
                }
                if ($hoy[1] == $cont) {
                    $valor1 = $hoy[0];
                    $hoy = $conexion->fetch_row($result);
                } else {
                    $valor1 = 0;
                }
                if ($prom[0] == $cont) {
                    $valor2 = $prom[1];
                    $prom = $conexion->fetch_row($result2);
                } else {
                    $valor2 = 0;
                }
                $dataArray = $dataArray . "data1.addRow([" . $cont . ", " . $valor2 . "," . $valor . ", " . $valor1 . "]);\n";
                $cont++;
            }
        }
        $conexion->MySQLClose();
    } catch (Exception $e) {
        echo 'Excepcion capturada: ', $e->getMessage(), "\n";
    }
    return $dataArray;
}
コード例 #2
0
ファイル: MySQL.php プロジェクト: C0l0ch0/CafeMomentos
 private function getKeyAccess($option)
 {
     switch ($option) {
         case 0:
         case 6:
             //$keyAccess = array("UserPweb","123456","localhost","billing");
             //$keyAccess = array("fox","123456","192.168.2.122","billing");
             $keyAccess = array("UserPweb", "123456", "localhost", "proyecto");
             break;
         default:
             $ConexionLocal = new MySQL(0);
             $ExecBD = $ConexionLocal->consulta("call GetDBKey(" . $option . ");");
             $returnKey = $ConexionLocal->fetch_row($ExecBD);
             $keyAccess = array($returnKey[2], $returnKey[3], $returnKey[1], "");
     }
     return $keyAccess;
 }
コード例 #3
0
ファイル: login.php プロジェクト: C0l0ch0/BPV_WAU
 function GoHome()
 {
     $conexion = new MySQL(0);
     $query = 'call GetHomeURL(' . $_SESSION['pais'] . ');';
     $result1 = $conexion->consulta($query);
     $row = $conexion->fetch_row($result1);
     $conexion->MySQLClose();
     switch ($_SESSION['access']) {
         case 1:
         case 2:
         case 3:
             $home = 'http://' . URL . DS . 'dashboard' . DS . 'metricas';
             break;
         default:
             $home = 'http://' . URL . DS . $row[0];
             break;
     }
     return $home;
 }
コード例 #4
0
 public static function getlogged($name)
 {
     $conexion = new MySQL(0);
     $query = "select logged, date_logged,session_id,now() as fe from usuario where usuario = '{$name}'";
     $result1 = $conexion->consulta($query);
     $valor = $conexion->num_rows($result1);
     if ($valor == 1) {
         $row = $conexion->fetch_row($result1);
         $value1 = $row[0];
         $value2 = $row[1];
         $value3 = $row[2];
         $ahora = $row[3];
         $tiempo_transcurrido = strtotime($ahora) - strtotime($value2);
         if ($tiempo_transcurrido >= 875) {
             $query = "update usuario set logged = 0, date_logged = now() where usuario = '{$name}';";
             $result1 = $conexion->consulta($query);
             $value1 = 0;
         } else {
             if (isset($_COOKIE['billing'])) {
                 if ($_COOKIE['billing'] == $value3) {
                     $query = "update usuario set logged = 0, date_logged = now(),session_id = '' where usuario = '{$name}';";
                     $result1 = $conexion->consulta($query);
                     setcookie('billing', null, -1, '/');
                     $value1 = 0;
                 }
             } else {
                 if ($value1 != 0) {
                     $value1 = 1;
                 }
             }
         }
         if ($value1 == 1) {
             $return = "islogged";
         } else {
             $return = "notlogged";
         }
         $conexion->MySQLClose();
         return $return;
     } else {
         $conexion->MySQLClose();
         return "not.found";
     }
 }
コード例 #5
0
ファイル: menuSA.php プロジェクト: C0l0ch0/BPV_WAU
function GetSecondLevel($carrier, $al)
{
    $conexion1 = new MySQL(0);
    if ($_SESSION['access'] == 5) {
        $query = 'call GetSubMenuLimits(' . $carrier . ');';
    } else {
        $query = 'call GetSubMenu(' . $carrier . ');';
    }
    $result = $conexion1->consulta($query);
    $miniBody = '';
    while ($link = $conexion1->fetch_row($result)) {
        $urlC = $link[2] == 1 ? 'http://' . URL . DS . $link[0] : $link[0];
        $IamHere = $al == $urlC ? 'class="active""' : '';
        if ($link[2] == 1) {
            $miniBody = $miniBody . "\t\t\t\t\t\t\t" . '<li ' . $IamHere . '><a href="' . $urlC . '">' . $link[1] . '</a></li>' . "\n";
        } else {
            $miniBody = $miniBody . "\t\t\t\t\t\t\t" . '<li ><a href="' . $urlC . '" target="_blank">' . $link[1] . '</a></li>' . "\n";
        }
    }
    $conexion1->MySQLClose();
    return $miniBody;
}
コード例 #6
0
if (isset($_POST["username"])) {
    $busca = $_POST["username"];
} else {
    $busca = "";
}
if (isset($_POST["supera"])) {
    $evento = $_POST["supera"];
} else {
    $evento = "";
}
$conexion = new MySQL(1);
$super = "per_david";
if ($busca != "") {
    $query = "select a.product_id , a.product_name, c.name,b.description,d.carrier_name\r\n\t\t\t\t\t\tfrom {$super}.product_master a\r\n\t\t\t\t\t\tjoin {$super}.product_status_master b on a.product_status_id = b.product_status_id\r\n\t\t\t\t\t\tjoin {$super}.integratordetails c on a.integror_id =c.integrator_id \r\n\t\t\t\t\t\tjoin {$super}.carrier_master d on d.carrier_id = c.carrier_id\r\n\t\t\t\t\t\twhere product_id = {$busca}";
    $result = $conexion->consulta($query);
    $row = $conexion->fetch_row($result);
    echo "<tr><td>{$row['0']}</td><td>{$row['1']}</td><td>{$row['2']}</td><td>{$row['3']}</td><td>{$row['4']}</td>";
    echo "</tbody>";
}
?>
					
				
								</table>
							</div>
						</div>
					</div>
                    <!-- end panel -->
                </div>
				
                <!-- end col-6 -->
				
コード例 #7
0
ファイル: ActiveMQ.php プロジェクト: C0l0ch0/BPV_WAU
<?php

import::load('lib', 'MySQL');
$conexion = new MySQL(6);
$strConsulta = "select amq_name,descripcion,pendiente,consumidores from monitor_queue;";
$consulta = $conexion->consulta($strConsulta);
if ($conexion->num_rows($consulta) > 0) {
    echo '<h1 class="page-header">ActiveMQ <small>Detalle de colas Alarmadas</small></h1>
						<div>';
    while ($row2 = $conexion->fetch_row($consulta)) {
        echo '
						<div class="col-md-3 " >
				        <div class="widget widget-stats bg-black">
				            <div class="stats-icon stats-icon-lg"><i class="fa fa-globe fa-fw"></i></div>
				            <div class="stats-title">' . $row2[0] . '<small> ' . $row2[1] . '</small></div>
				            <div class="stats-number"><small>Encolados:</small> ' . $row2[2] . '</div>
				            <div class="stats-progress progress">
	                            <div class="progress-bar" style="width: 100%;"></div>
	                        </div>
	                        <div class="stats-desc">Consumidores: ' . $row2[3] . '</div>
				        </div>
				        </div>';
    }
    echo '</div>';
}
コード例 #8
0
ファイル: function.php プロジェクト: koeznailbiter/Koez-RO-CP
function check_forum_perm($forum_id, $g_id, $perm)
{
    global $CONFIG_sql_cpdbname;
    $sql = new MySQL();
    $query = "SELECT forum_perm FROM {$CONFIG_sql_cpdbname}.forum WHERE forum_id=\"" . mysql_res($forum_id) . "\"";
    $sql->result = $sql->execute_query($query, 'function.php');
    if ($sql->count_rows()) {
        $row = $sql->fetch_row();
        if (preg_match("#\\[g" . $g_id . "\\](.+?)\\[/g" . $g_id . "\\]#is", $row[0])) {
            preg_replace_callback("#\\[g" . $g_id . "\\](.+?)\\[/g" . $g_id . "\\]#is", 'get_forum_perm', $row[0]);
            global $forum_permission;
            switch ($perm) {
                case "read_perm":
                    if (!strstr($forum_permission, ":show_perm:")) {
                        return false;
                    }
                    break;
                case "reply_perm":
                case "start_perm":
                    if (!strstr($forum_permission, ":show_perm:")) {
                        return false;
                    }
                    if (!strstr($forum_permission, ":read_perm:")) {
                        return false;
                    }
                    break;
            }
            if (strstr($forum_permission, ":" . $perm . ":")) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    } else {
        return false;
    }
}
コード例 #9
0
ファイル: database.php プロジェクト: C0l0ch0/BPV_WAU
 function save_sa()
 {
     if (isset($_POST["descripcion"]) and isset($_POST["pais"]) and $_POST["descripcion"] != '' and $_POST["pais"] != '') {
         $conexion = new MySQL(0);
         $strIngreso = "call CheckIfTableExist('" . strtolower($_POST["descripcion"]) . "');";
         $execute = $conexion->consulta($strIngreso);
         $exist = $conexion->fetch_row($execute);
         $conexion->MySQLClose();
         echo "1";
         if ($exist[0] == 0) {
             $conexion = new MySQL(0);
             $strIngreso = "call CheckIfTableExist('" . strtolower($_POST["descripcion"]) . "_i');";
             $execute2 = $conexion->consulta($strIngreso);
             $exist2 = $conexion->fetch_row($execute2);
             $conexion->MySQLClose();
             echo "2";
             if ($exist2[0] == 0) {
                 $conexion = new MySQL(0);
                 $strIngreso = "call CreateTables('" . strtolower($_POST["descripcion"]) . "');";
                 $execute = $conexion->consulta($strIngreso);
                 $conexion->MySQLClose();
                 echo "3";
                 $conexion = new MySQL(0);
                 $strIngreso = "insert into billing.carrier (id_carrier,descripcion, nombre) values(null,'" . strtoupper($_POST["descripcion"]) . "','" . strtoupper($_POST["pais"]) . "');";
                 $execute = $conexion->consulta($strIngreso);
                 $conexion->MySQLClose();
                 echo "4";
                 $_SESSION['value'] = "ok";
             } else {
                 $_SESSION['value'] = "error1";
             }
         } else {
             $_SESSION['value'] = "error1";
         }
         session_write_close();
         exit(header('Location: http://' . URL . DS . 'database' . DS . 'create_sa'));
     } else {
         exit(header('Location: http://' . URL . DS . 'database' . DS . 'create_sa'));
     }
 }
コード例 #10
0
ファイル: lib_ajax.php プロジェクト: koeznailbiter/Koez-RO-CP
function get_save_quick_edit($val, $reply_id)
{
    header("Content-type: text/xml;charset=windows-874");
    global $CONFIG_sql_cpdbname, $STORED, $SERVER, $CONFIG_max_post_length, $CP;
    $reply_id = (int) $reply_id;
    $val = iconv("UTF-8", "windows-874", $val);
    $val = str_replace("symbol_and", "&", $val);
    $val = str_replace("symbol_plus", "+", $val);
    $form_id = "quick_edit_form_" . $reply_id . "";
    $sql = new MySQL();
    $query = "SELECT reply_id,reply_message,reply_edit_date,reply_edit_name FROM {$CONFIG_sql_cpdbname}.board_reply WHERE reply_id =\"" . mysql_res($reply_id) . "\"";
    $sql->result = $sql->execute_query($query, 'lib_ajax.php');
    $row = $sql->fetch_row();
    $IS_EDIT_POST = checkprivilege_action($CP[login_id], g_edit_posts) ? 1 : 0;
    if (!empty($CP[login_id]) && ($CP[login_id] == $row[reply_user_id] || $IS_EDIT_POST) && length($val, 3, $CONFIG_max_post_length)) {
        $val = checkstring($val, 1);
        $sql->execute_query("UPDATE {$CONFIG_sql_cpdbname}.board_reply SET reply_message = \"" . $val . "\", reply_ip=\"" . $CP['ip_address'] . "\",reply_edit_name=\"" . $CP['login_name'] . "\",reply_edit_date=\"" . $CP['time'] . "\" WHERE reply_id = \"" . mysql_res($row['reply_id']) . "\"", 'lib_ajax.php');
        $query = "SELECT reply_message,reply_edit_date,reply_edit_name FROM {$CONFIG_sql_cpdbname}.board_reply WHERE reply_id =\"" . mysql_res($row['reply_id']) . "\"";
        $sql->result = $sql->execute_query($query, 'lib_ajax.php');
        $row = $sql->fetch_row();
        $reply_message = replace_text($row[reply_message], $img_num);
        $reply_edit_date = get_date("M j y, H:i:s A", $row[reply_edit_date]);
        echo "<div class=\"poststyle\">{$reply_message}</div>\n<br /><br /><span class=\"edit\">This post has been edited by <B>{$row['reply_edit_name']}</B> on {$reply_edit_date}</span>\n";
    } else {
        $reply_message = replace_text($row[reply_message]);
        echo "<div class=\"poststyle\">{$reply_message}</div>";
        if (!empty($row[reply_edit_name])) {
            $reply_edit_date = get_date("M j y, H:i:s A", $row[reply_edit_date]);
            echo "<br /><br /><span class=\"edit\">This post has been edited by <B>{$row['reply_edit_name']}</B> on {$reply_edit_date}</span>";
        }
    }
}
コード例 #11
0
ファイル: metricas.php プロジェクト: C0l0ch0/BPV_WAU
function getData($name, $num)
{
    $dataArray = "";
    $fecha = date('H', strtotime("+1 Hours"));
    $dia = date('d', strtotime("+1 day"));
    try {
        $conexion = new MySQL(0);
        $query0 = ' select hour(date_add(NOW(), INTERVAL -' . HOURDB . ' hour));';
        $result0 = $conexion->consulta($query0);
        $exec0 = $conexion->fetch_row($result0);
        $fecha = $exec0[0];
        $query = 'CALL GetCarrierChargeToday("' . strtolower($name) . '",' . HOURDB . ');';
        $result = $conexion->consulta($query);
        $conexion->prepareNextResult();
        $query1 = 'CALL GetCarrierChargeYesterday("' . strtolower($name) . '",' . HOURDB . ');';
        $result1 = $conexion->consulta($query1);
        $conexion->prepareNextResult();
        $query2 = 'CALL GetCarrierChargeProm("' . strtolower($name) . '",' . HOURDB . ');';
        $result2 = $conexion->consulta($query2);
        $conexion->prepareNextResult();
        if (!$result or !$result1 or !$result2) {
            throw new Exception("No se logro obtener informacion de cobros....\n");
        } else {
            $cont = 0;
            @($hoy = $conexion->fetch_row($result));
            @($ayer = $conexion->fetch_row($result1));
            @($prom = $conexion->fetch_row($result2));
            while ($cont <= $fecha) {
                if ($ayer[1] == $cont and $ayer[1] != '') {
                    @($valor = $ayer[0]);
                    @($ayer = $conexion->fetch_row($result1));
                } else {
                    $valor = 0;
                }
                if ($hoy[1] == $cont and $hoy[1] != '') {
                    @($valor1 = $hoy[0]);
                    @($hoy = $conexion->fetch_row($result));
                } else {
                    $valor1 = 0;
                }
                if ($prom[1] == $cont and $prom[1] != '') {
                    @($valor2 = $prom[0]);
                    @($prom = $conexion->fetch_row($result2));
                } else {
                    $valor2 = 0;
                }
                $dataArray = $dataArray . "data" . $num . ".addRow([" . $cont . ", " . number_format($valor2, 0, '', '') . ", " . $valor . " , " . $valor1 . "]);\n";
                //$dataArray = $dataArray."data1.addRow([".$cont.", ".$valor2.",".$valor.", ".$valor1."]);\n";
                $cont++;
            }
            /*while ($hoy = $conexion->fetch_row($result)){
                if( @$ayer  = $conexion->fetch_row($result1) and
                    @$prom1 = $conexion->fetch_row($result2)){
                    if($hoy[0]    == ''){$hoy[0]    = 0;}
                    if($ayer[0]   == ''){$ayer[0]   = 0;}
                    if($prom1[0]  == ''){$prom1[0]  = 0;}
                    $dataArray = $dataArray."data".$num.".addRow([".$hoy[1].", ".number_format($prom1[0],0,'','').", ".$ayer[0]." , ".$hoy[0]."]);\n";
                }
              }*/
        }
        $conexion->MySQLClose();
    } catch (Exception $e) {
        echo 'Excepcion capturada: ', $e->getMessage(), "\n";
    }
    return $dataArray;
}
コード例 #12
0
ファイル: BDCobros.php プロジェクト: C0l0ch0/BPV_WAU
 function GetCharges($db_selection, $query, $opt, $SaveAction)
 {
     if (isset($db_selection) and isset($query)) {
         try {
             $conectorLocal1 = new MySQL(0);
             $dbdata = "call GetDBKey(" . $db_selection . ");";
             $exec = $conectorLocal1->consulta($dbdata);
             $conectorLocal1->prepareNextResult();
             $result = $conectorLocal1->fetch_row($exec);
             self::MySQLExternal($result[1], $result[2], $result[3], $this->schema);
             if (!$this->ErrorExternalConector) {
                 $execute = self::externalQuery($query);
                 $i = 0;
                 while ($row = self::externalfetch_row($execute)) {
                     switch ($opt) {
                         case 1:
                             $LoadCant = 0;
                             if ($row[0] != "") {
                                 $LoadCant = $row[0];
                             }
                             self::AddBodyLog("Cobros generados: " . $LoadCant);
                             self::AddBodyLog("Enviando a guardar informacion...........");
                             self::SaveCharges($row, $opt, $SaveAction);
                             break;
                         case 2:
                             self::AddBodyLog("Cobros generados para " . $row[1] . ": " . $row[2]);
                             self::AddBodyLog("Enviando a guardar informacion...........");
                             self::SaveCharges($row, $opt, $SaveAction);
                             $i++;
                             break;
                         case 3:
                             $LoadCant = 0;
                             if ($row[0] != "") {
                                 $LoadCant = $row[0];
                             }
                             $dbdata = "call GetAVGChargesPerCarrier(" . $this->id_carrier . ",2);";
                             $exec = $conectorLocal1->consulta($dbdata);
                             $result = $conectorLocal1->fetch_row($exec);
                             $info[0] = $row[0];
                             $info[1] = $result[0];
                             self::AddBodyLog("Obteniendo Promedio de cobros " . $dbdata . ": " . $result[0]);
                             self::AddBodyLog("Cobros generados: " . $LoadCant);
                             self::AddBodyLog("Enviando a guardar informacion...........");
                             self::SaveCharges($info, $opt, $SaveAction);
                             break;
                         case 4:
                             self::AddBodyLog("Cobros generados para " . $row[2] . ": " . $row[3]);
                             self::AddBodyLog("Enviando a guardar informacion...........");
                             self::SaveCharges($row, $opt, $SaveAction);
                             $i++;
                             break;
                             break;
                     }
                 }
                 if ($opt == 2) {
                     self::AddBodyLog("Integradores Procesados: " . $i);
                 }
                 if ($opt == 4) {
                     self::AddBodyLog("Productos Procesados: " . $i);
                 }
             }
             $conectorLocal1->MySQLClose();
         } catch (Exception $e) {
             self::AddBodyLog("No se logro obtener la informacion de " . $this->carrier_name . " Validar conexion a Base de datos!!!!!!!!!!!!!!!");
             self::AddBodyLog("Trace " . $this->ErrorExternalConector);
         }
     }
 }
コード例 #13
0
ファイル: carrierD.php プロジェクト: C0l0ch0/BPV_WAU
                                        </tr>
                                    </thead>
									
									<?php 
$conexion = new MySQL($bd_id);
$query2 = 'select a.integrator_id, b.name, c.cuenta, sum(a.qty)as "total"
									from ' . $schema . '.resume_carrier a
									join ' . $schema . '.integratordetails b on a.integrator_id = b.integrator_id
									join(select integror_id as integror_id, count(product_id) as "cuenta"
									from ' . $schema . '.product_master 									
									group by integror_id ) c on a.integrator_id = c.integror_id
									where a.created_date >= left(NOW() - INTERVAL 6 HOUR,10) and a.type in ("DB") and a.status = "Success"
									group by a.integrator_id';
$resultfox2 = $conexion->consulta($query2);
echo "<tbody>";
while ($row2 = $conexion->fetch_row($resultfox2)) {
    echo "<tr><td>{$row2['0']}</td><td><a onclick=\"GotoDetails({$row2['0']})\">{$row2['1']}<a></td><td>{$row2['2']}</td><td>" . number_format($row2[3]) . "</td></tr>";
}
echo "</tbody>";
?>
                                </table>
                            </div>
                        </div>
                    </div>
				     <!-- End Panel Integradores-->
					 
				</div>
			    <!-- end col-8  Integradores-->
				
				<!-- Begin Panel Contactos MOVISTAR-->
			    <div class="col-md-12">
コード例 #14
0
ファイル: metricas.php プロジェクト: C0l0ch0/BPV_WAU
function DrawSomeTables()
{
    $Table = '';
    $conexionD = new MySQL(0);
    $query = 'call GetMaxTable();';
    $exec = $conexionD->consulta($query);
    $conexionD->prepareNextResult();
    $resultado = $conexionD->fetch_row($exec);
    $numFields = $resultado[1];
    $query = 'call GetDataTable();';
    $exec = $conexionD->consulta($query);
    $conexionD->prepareNextResult();
    $tempT2 = $tempT1 = '
                    <div class="CSSTableGenerator" style="display:inline-block;">
                      <table>
                        <tr>
                          <td >Super Agregador</td>
                          <td >Cobros Hoy</td>
                          <td >Promedio</td>
                          <td >Porcentaje</td>
                        </tr>
                        ';
    while ($row = $conexionD->fetch_row($exec)) {
        $nombreC = $row[0] == 'saca' ? 'SAGUA' : $row[0];
        $CantHoy = number_format($row[1]);
        $CantProm = number_format($row[2]);
        $CantPor = $CantProm == 0 ? 0 : number_format($CantHoy * 100 / $CantProm);
        switch ($row[3]) {
            case 1:
                $tempT1 = $tempT1 . '<tr><td align="center"><a href="http://' . URL . DS . 'detalle/' . strtolower($nombreC) . '"> ' . strtoupper($nombreC) . ' </a> </td><td align="right">' . $CantHoy . '</td><td align="right">' . $CantProm . '</td><td align="right">' . $CantPor . '%</td></tr>';
                break;
            case 2:
                $tempT2 = $tempT2 . '<tr><td align="center"><a href="http://' . URL . DS . 'detalle/' . strtolower($nombreC) . '"> ' . strtoupper($nombreC) . ' </a> </td><td align="right">' . $CantHoy . '</td><td align="right">' . $CantProm . '</td><td align="right">' . $CantPor . '%</td></tr>';
                break;
        }
    }
    $tempT1 = $tempT1 . '
                      </table>
                    </div>
                    <div style="display:inline-block;"></div>';
    $tempT2 = $tempT2 . '
                      </table>
                    </div>
                    <div style="display:inline-block;"></div>';
    $Table = $tempT1 . $tempT2;
    return $Table;
}
コード例 #15
0
ファイル: detalle.php プロジェクト: C0l0ch0/BPV_WAU
 private function GetArrayInfo($option, $mensaje)
 {
     $conexion = new MySQL(0);
     $query = "call GetDescriptionInfo('" . $option . "');";
     $exec = $conexion->consulta($query);
     $row2 = $conexion->fetch_row($exec);
     $return = array("Titulo" => "Billing Vas Pass", "mensaje" => $mensaje, "name1" => strtolower($row2[0]), "data1" => "", "pais" => $row2[1], "schema" => $row2[2], "bd_id" => $row2[3]);
     $conexion->MySQLClose();
     return $return;
 }
コード例 #16
0
ファイル: Validar.php プロジェクト: C0l0ch0/CafeMomentos
     $check_L = false;
 } else {
     if ($loggedstatus === "notlogged") {
         $check_L = $loginP->login($_POST['login'], $_POST['password']);
         echo $check_L;
     } else {
         $check_L = false;
     }
 }
 if ($check_L) {
     $t_login = $loginP->check();
     if ($t_login) {
         $conexion = new MySQL(0);
         $query = 'call GetHomeURL(' . $_SESSION['pais'] . ');';
         $result1 = $conexion->consulta($query);
         $row = $conexion->fetch_row($result1);
         $conexion->MySQLClose();
         switch ($_SESSION['access']) {
             case 1:
             case 2:
             case 3:
                 if (!isset($_SESSION['home'])) {
                     $_SESSION['home'] = 'http://' . URL . DS . 'dashboard' . DS . 'metricas';
                 }
                 break;
             default:
                 if (!isset($_SESSION['home'])) {
                     $_SESSION['home'] = 'http://' . URL . DS . $row[0];
                 }
                 break;
         }
コード例 #17
0
ファイル: CarrierD_I.php プロジェクト: C0l0ch0/BPV_WAU
									<thead>
										<tr>
											<th>#</th>
											<th>Nombre</th>
											<th>Organizacion</th>
											<th>Email</th>
											<th>Telefono</th>											
										</tr>
									</thead>
									<tbody>
										<?php 
$numero = 1;
$conexion = new MySQL(0);
$contactos = 'select * from contacts where id_carrier=1 and id_integrador =' . $integrador . '';
$result69 = $conexion->consulta($contactos);
while ($row69 = $conexion->fetch_row($result69)) {
    echo "<tr><td>{$numero}</td><td>{$tituloG}</td><td>{$row69['3']}</td><td>{$row69['4']}</td><td>{$row69['5']}</td></tr>";
    $numero++;
}
?>
									</tbody>
								</table>
							</div>
						</div>
					</div>
                    <!-- end panel contactos integradores -->
					
					
			    </div>
			    <!-- end col-12 -->
		</div><br>
コード例 #18
0
ファイル: reg_code.php プロジェクト: koeznailbiter/Koez-RO-CP
// \___/\___/_//_/\__/_/  \___/_/ /_/   \_,_/_//_/\__/_/ 
// =========================================================================
// Copyright (c) Stargames Control Panel - Licensed under GNU GPL.
// See LICENSE File
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php 
if ($_GET['sc']) {
    require_once "memory.php";
    $sql = new MySQL();
    $sql->Connect($CONFIG_sql_host, $CONFIG_sql_username, $CONFIG_sql_password);
    $query = "SELECT sc_code FROM {$CONFIG_sql_cpdbname}.security_code WHERE sc_id = \"" . mysql_res($_GET['sc']) . "\"";
    $sql->result = $sql->execute_query($query, 'reg_code.php');
    $row = $sql->fetch_row();
    $sc_code = $row['sc_code'];
    $reg_str = "";
    for ($i = 0; $i < 6; $i++) {
        $ret_str .= $sc_code[$i];
        $ret_str .= " ";
    }
    $sc_code = $ret_str;
    $im = imagecreate(85, 20);
    $bgcolor = imagecolorallocate($im, 255, 255, 255);
    // Background Color
    $fontcolor = imagecolorallocate($im, 00, 00, 00);
    // Font Color
    imagestring($im, 3, 5, 5, $sc_code, $fontcolor);
    header("Content-type: image/png");
    imagepng($im);
コード例 #19
0
                                    <th style="text-align: right;">Gross</th>
                                    <th style="text-align: right;">Earning</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php 
$totalE = 0;
$totalG = 0;
$conexion = new MySQL(0);
$query = '	select name,sum(gross)
												from ' . $name1 . '_billing
												where created_date = date(date_add(now(), interval -30 hour))
												group by name
												order by sum(gross) desc;';
$exec = $conexion->consulta($query);
while ($row2 = $conexion->fetch_row($exec)) {
    $totalG = $totalG + $row2[1];
    echo "<tr><td> Integrador" . strtoupper($row2[0]) . '</td><td style="text-align: right;">$' . number_format($row2[1], 2, '.', '') . '</td><td style="text-align: right;">$' . number_format($row2[1] * 0.01349999116, 2, '.', '') . "</td></tr>";
    $totalE = $totalE + $row2[1] * 0.01349999116;
}
?>
                            </tbody>
                        </table>
                    </div>
                    <div class="invoice-price">
                        <div class="invoice-price-left">
                            <div class="invoice-price-row">
                                <div class="sub-price">
                                    <small>Gross USD</small>
                                    <?php 
echo "\$" . number_format($totalG, 2, '.', '');
コード例 #20
0
ファイル: index.php プロジェクト: koeznailbiter/Koez-RO-CP
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php 
require_once "memory.php";
$sql = new MySQL();
$sql->Connect($CONFIG_sql_host, $CONFIG_sql_username, $CONFIG_sql_password);
$CP['start_time'] = getmicrotime();
$query = "SELECT memory_value1 FROM {$CONFIG_sql_cpdbname}.memory WHERE memory_object =\"sgcp_install\" AND memory_value1=\"1\"";
$sql->result = mysql_query($query);
if ($sql->count_rows()) {
    $query = "SELECT memory_value2,memory_value3 FROM {$CONFIG_sql_cpdbname}.memory WHERE memory_object =\"ip_blacklist\" AND memory_value1=\"" . mysql_res($CP['ip_address']) . "\"";
    $sql->result = $sql->execute_query($query, 'index.php');
    $check_iplist = $sql->count_rows();
    $iplist = $sql->fetch_row();
    if ($_COOKIE['IP_Blacklist'] || $check_iplist) {
        $query = "SELECT memory_value3 FROM {$CONFIG_sql_cpdbname}.memory WHERE memory_object =\"ip_blacklist\" AND memory_value3=\"" . mysql_res($_COOKIE['IP_Blacklist']) . "\"";
        $sql->result = $sql->execute_query($query, 'index.php');
        if ($_COOKIE['IP_Blacklist'] && !$sql->count_rows()) {
            do_blacklist(4);
        } else {
            $ip_state = $iplist[memory_value2];
            if ($_COOKIE[IP_Blacklist] && $_COOKIE[IP_Blacklist] == $iplist[memory_value3] && $ip_state != "block") {
                do_blacklist(2, $iplist[memory_value3]);
            } else {
                if ($check_iplist && empty($_COOKIE[IP_Blacklist])) {
                    switch ($ip_state) {
                        case block:
                            do_blacklist(1, $iplist[memory_value3]);
                            break;