Наследование: extends foreground
Пример #1
0
 function all()
 {
     global $_G;
     include_once libfile('action/index');
     $index = new index();
     $index->all('index/all');
 }
Пример #2
0
 function index()
 {
     $datas['title'] = 'Medoo-MVC';
     $hello = new index();
     $datas['hello'] = $hello->hello();
     $lib_class = new a();
     $datas['hi'] = $lib_class->hi();
     $this->display($datas);
 }
Пример #3
0
 function cat_more()
 {
     $catid = get('id');
     $database = new index();
     $datas['contents'] = $database->cat_contents($catid);
     $data = $datas['contents'];
     //print_r($data);
     $result = $database->get_more($data);
     echo $result;
 }
Пример #4
0
 /**
  * Starts the Application
  * Takes the parts of the URL and loads the according controller & method and passes the parameter arguments to it
  * TODO: get rid of deep if/else nesting
  * TODO: make the hardcoded locations ("error/index", "index.php", new Index()) dynamic, maybe via config.php
  */
 public function __construct()
 {
     $this->splitUrl();
     // check for controller: is the url_controller NOT empty ?
     if ($this->url_controller) {
         // check for controller: does such a controller exist ?
         if (file_exists(CONTROLLER_PATH . $this->url_controller . '.php')) {
             // if so, then load this file and create this controller
             // example: if controller would be "car", then this line would translate into: $this->car = new car();
             require CONTROLLER_PATH . $this->url_controller . '.php';
             $this->url_controller = new $this->url_controller();
             // check for method: does such a method exist in the controller ?
             if ($this->url_action) {
                 if (method_exists($this->url_controller, $this->url_action)) {
                     // call the method and pass the arguments to it
                     if (isset($this->url_parameter_3)) {
                         $this->url_controller->{$this->url_action}($this->url_parameter_1, $this->url_parameter_2, $this->url_parameter_3);
                     } elseif (isset($this->url_parameter_2)) {
                         $this->url_controller->{$this->url_action}($this->url_parameter_1, $this->url_parameter_2);
                     } elseif (isset($this->url_parameter_1)) {
                         $this->url_controller->{$this->url_action}($this->url_parameter_1);
                     } else {
                         // if no parameters given, just call the method without arguments
                         $this->url_controller->{$this->url_action}();
                     }
                 } else {
                     // redirect user to error page (there's a controller for that)
                     header('location: ' . URL . 'error/index');
                 }
             } else {
                 // default/fallback: call the index() method of a selected controller
                 $this->url_controller->index();
             }
             // obviously mistyped controller name, therefore show 404
         } else {
             // redirect user to error page (there's a controller for that)
             header('location: ' . URL . 'error/index');
         }
         // if url_controller is empty, simply show the main page (index/index)
     } else {
         //redirect for entering page and not logged in
         if (isset($_SESSION['user_logged_in'])) {
             require CONTROLLER_PATH . 'home.php';
             $controller = new home();
             $controller->index();
         } else {
             require CONTROLLER_PATH . 'index.php';
             $controller = new index();
             $controller->index();
         }
     }
 }
Пример #5
0
 public static function procesarAccion($accion)
 {
     switch ($accion) {
         case 'formRegi':
             index::permitirAcceso('personas');
             self::_formularioRegistro();
             break;
         case 'guarRegi':
             index::permitirAcceso('personas');
             self::_guardarRegistro();
             break;
         case 'formBusq':
             self::_formularioBusqueda();
             break;
         case 'buscPers':
             self::_realizarBusqueda();
             break;
         case 'formModi':
             index::permitirAcceso('personas');
             self::_formularioModificar();
             break;
         case 'guarModi':
             index::permitirAcceso('personas');
             self::_guardarModificar();
             break;
         default:
             self::_formularioBusqueda();
             break;
     }
 }
Пример #6
0
 public function route()
 {
     $route = $this->findRoute(implode('/', $this->route), $this->routes);
     if ($route) {
         $route->load();
     }
     $route = $this->findRoute('/*', $this->routes);
     if ($route) {
         $route->load();
     }
     /**
      * Need to handle 404's here?
      */
     $lost = new index();
     $lost->load();
 }
Пример #7
0
 function procesarAccion($accion)
 {
     switch ($accion) {
         case 'formRegiE':
             index::permitirAcceso('cursos');
             self::_formularioRegistrarEdicion();
             break;
         case 'guarRegiE':
             index::permitirAcceso('cursos');
             self::_guardarRegistrarEdicion();
             break;
         case 'formFijaFaci':
             index::permitirAcceso('cursos');
             self::_formularioFijarFacilitador();
             break;
         case 'guarFijaFaci':
             index::permitirAcceso('cursos');
             self::_guardarFijarFacilitador();
             break;
         case 'menuEdic':
             self::_menuEdicion();
             break;
         case 'formModiE':
             index::permitirAcceso('cursos');
             self::_formularioModificarEdicion();
             break;
         case 'guarModiE':
             index::permitirAcceso('cursos');
             self::_guardarModificarEdicion();
             break;
         case 'formPart':
             index::permitirAcceso('personas');
             self::_formularioParticipante();
             break;
         case 'guarPart':
             index::permitirAcceso('personas');
             self::_guardarParticipante();
             break;
         case 'verPart':
             self::_verParticipantes();
             break;
         case 'cerrar':
             index::permitirAcceso('cursos');
             self::_cerrarEdicion();
             break;
         case 'guarCerrar':
             index::permitirAcceso('cursos');
             self::_guardarCerrarEdicion();
             break;
         case 'verCerrar':
             self::_verCerrar();
             break;
         default:
             unset($_SESSION['formulario']);
             self::_regresarPrincipal();
             break;
     }
 }
 function __construct()
 {
     //
     //error_reporting(E_ERROR | E_PARSE);
     $url = isset($_GET['url']) ? $_GET['url'] : null;
     $url = rtrim($url, '/');
     $url = explode('/', $url);
     //print_r($url);
     if (empty($url[0])) {
         require 'Controllers/index.php';
         $controller = new index();
         $controller->loadModel('index');
         $controller->index();
         return false;
     }
     //
     $file = 'Controllers/' . $url[0] . '.php';
     if (file_exists($file)) {
         require $file;
     } else {
         $this->error();
         return false;
     }
     $controller = new $url[0]();
     $controller->loadModel($url[0]);
     //
     if (isset($url[2])) {
         if (method_exists($controller, $url[1])) {
             $controller->{$url[1]}($url[2]);
         } else {
             $this->error();
         }
     } else {
         if (isset($url[1])) {
             if (method_exists($controller, $url[1])) {
                 $controller->{$url[1]}();
             } else {
                 $this->error();
             }
         } else {
             $controller->index();
         }
     }
 }
Пример #9
0
 public function initialize()
 {
     $this->template = template::getInstance();
     if ($this->ajax) {
         $this->content = ajax::getInstance();
     } else {
         $this->content = index::getInstance();
     }
     $this->content->initialize();
 }
Пример #10
0
 public function insert()
 {
     //insert in si_invoice
     global $db_server;
     $sql = "INSERT \n\t\t\t\tINTO\n\t\t\t" . TB_PREFIX . "invoices (\n\t\t\t\tid, \n\t\t \t\tindex_id,\n\t\t\t\tdomain_id,\n\t\t\t\tbiller_id, \n\t\t\t\tcustomer_id, \n\t\t\t\ttype_id,\n\t\t\t\tpreference_id, \n\t\t\t\tdate, \n\t\t\t\tnote,\n\t\t\t\tcustom_field1,\n\t\t\t\tcustom_field2,\n\t\t\t\tcustom_field3,\n\t\t\t\tcustom_field4\n\t\t\t)\n\t\t\tVALUES\n\t\t\t(\n\t\t\t\tNULL,\n\t\t\t\t:index_id,\n\t\t\t\t:domain_id,\n\t\t\t\t:biller_id,\n\t\t\t\t:customer_id,\n\t\t\t\t:type_id,\n\t\t\t\t:preference_id,\n\t\t\t\t:date,\n\t\t\t\t:note,\n\t\t\t\t:custom_field1,\n\t\t\t\t:custom_field2,\n\t\t\t\t:custom_field3,\n\t\t\t\t:custom_field4\n\t\t\t\t)";
     $pref_group = getPreference($this->preference_id, $this->domain_id);
     $sth = dbQuery($sql, ':index_id', index::next('invoice', $pref_group['index_group'], $this->domain_id), ':domain_id', $this->domain_id, ':biller_id', $this->biller_id, ':customer_id', $this->customer_id, ':type_id', $this->type_id, ':preference_id', $this->preference_id, ':date', $this->date, ':note', trim($this->note), ':custom_field1', $this->custom_field1, ':custom_field2', $this->custom_field2, ':custom_field3', $this->custom_field3, ':custom_field4', $this->custom_field4);
     #index::increment('invoice',$pref_group['index_group'], $domain_id,$this->biller_id);
     index::increment('invoice', $pref_group['index_group'], $this->domain_id);
     return lastInsertID();
 }
Пример #11
0
 public static function increment($node, $sub_node = 0, $domain_id = '', $sub_node_2 = 0)
 {
     $domain_id = domain_id::get($domain_id);
     $next = index::next($node, $sub_node, $domain_id, $sub_node_2);
     if ($next == 1) {
         $sql = "INSERT INTO " . TB_PREFIX . "index (id, node, sub_node, sub_node_2, domain_id) \n\t\t\t\t\tVALUES (:id, :node, :sub_node, :sub_node_2, :domain_id)";
     } else {
         $sql = "UPDATE " . TB_PREFIX . "index \n                    SET   id = :id \n                    WHERE node = :node\n\t\t\t\t\tAND   sub_node = :sub_node\n                    AND   sub_node_2 = :sub_node_2\n                    AND   domain_id = :domain_id\n\t\t\t\t  ";
     }
     $sth = dbQuery($sql, ':id', $next, ':node', $node, ':sub_node', $sub_node, ':sub_node_2', $sub_node_2, ':domain_id', $domain_id);
     return $next;
 }
Пример #12
0
 function index()
 {
     if ($this->args[0] == "index") {
         $this->smarty->setCacheID("MAINPAGE|offset_0");
         if (!$this->smarty->isCached()) {
             $sqlData = index::mainPage();
             $this->smarty->assign("posts", $sqlData);
         }
     } else {
         system::setParam("page", "static/" . $this->args[0]);
     }
 }
Пример #13
0
 public static function procesarAccion($accion)
 {
     switch ($accion) {
         case 'formRegiC':
             index::permitirAcceso('cursos');
             self::_formularioRegistro();
             break;
         case 'guarRegiC':
             index::permitirAcceso('cursos');
             self::_guardarRegistro();
             break;
         case 'formBusqC':
             self::_formularioBusqueda();
             break;
         case 'buscCurso':
             self::_realizarBusqueda();
             break;
         case 'formModiC':
             index::permitirAcceso('cursos');
             self::_formularioModificar();
             break;
         case 'guarModiC':
             index::permitirAcceso('cursos');
             self::_guardarModificar();
             break;
         case 'verEdic':
             self::_verEdiciones();
             break;
         case 'veriCodi':
             self::_verificarCodigo();
             break;
         case 'busqCodi':
             self::_busquedaCodigo();
             break;
         case 'bloquear':
             self::bloquear();
             break;
         case 'historial':
             self::_historial();
             break;
         case 'pasados':
             self::_pasados();
             break;
         case 'proximos':
             self::_proximos();
             break;
         default:
             self::_formularioBusqueda();
             break;
     }
 }
Пример #14
0
 function procesarAccion($accion)
 {
     switch ($accion) {
         case 'listUsua':
             index::permitirAcceso('admin');
             self::_listadoUsuarios();
             break;
         case 'regiUsua':
             index::permitirAcceso('admin');
             self::_formularioRegistro();
             break;
         case 'guarUsua':
             index::permitirAcceso('admin');
             self::_guardarRegistro();
             break;
         case 'modiUsua':
             index::permitirAcceso('admin');
             self::_formularioModificar();
             break;
         case 'guarModi':
             index::permitirAcceso('admin');
             self::_guardarModificar();
             break;
         case 'cambEsta':
             index::permitirAcceso('admin');
             self::_cambiarEstado();
             break;
         case 'guarEsta':
             index::permitirAcceso('admin');
             self::_guardarEstado();
             break;
         case 'cambClav':
             self::_cambiarClave();
             break;
         case 'guarClav':
             self::_guardarClave();
             break;
         case 'restClav':
             index::permitirAcceso('admin');
             self::_restablecerClave();
             break;
         case 'guarRest':
             index::permitirAcceso('admin');
             self::_guardarRestablecer();
             break;
         default:
             self::_inicioCopia();
             break;
     }
 }
Пример #15
0
 function __construct()
 {
     // Alter the URL to the appropriate MVC call
     if (!isset($_GET['url'])) {
         $url[0] = "index";
     } else {
         $url = $_GET['url'];
         $url = rtrim($url, '/');
         $url = explode("/", $url);
     }
     $controller_file = CONTROLLERS_DIR . $url[0] . ".php";
     if (file_exists($controller_file)) {
         require $controller_file;
         $controller = new $url[0]();
         $controller->loadModel($url[0]);
         if (isset($url[1]) && method_exists($controller, $url[1])) {
             // Needs error catching for correct arguments
             if (isset($url[3])) {
                 $controller->{$url[1]}($url[2], $url[3]);
             } else {
                 if (isset($url[2])) {
                     $controller->{$url[1]}($url[2]);
                 } else {
                     $controller->{$url[1]}();
                 }
             }
         } else {
             $controller->index();
         }
     } else {
         require CONTROLLERS_DIR . "index.php";
         $controller = new index();
         $controller->index();
         return false;
     }
 }
Пример #16
0
 public static function increment($node, $sub_node = "")
 {
     $next = index::next($node, $sub_node);
     global $db;
     global $auth_session;
     /*
     if ($sub_node !="") 
     {
         $subnode = "and sub_node = ".$sub_node; 
     }
     */
     if ($next == 1) {
         $sql = "insert into si_index (id, node, sub_node, domain_id) VALUES (:id, :node, :sub_node, :domain_id);";
     } else {
         $sql = "update\n                        si_index \n                    set \n                        id = :id \n                    where\n                        node = :node\n                    and\n                        domain_id = :domain_id\n                    and\n                        sub_node = :sub_node";
     }
     $sth = $db->query($sql, ':id', $next, ':node', $node, ':sub_node', $sub_node, ':domain_id', $auth_session->domain_id) or die(htmlsafe(end($dbh->errorInfo())));
     return $next;
 }
Пример #17
0
 static function getInstance()
 {
     if (is_null(index::$instance)) {
         $session = session::getInstance();
         $zone = $session->getData('zone');
         if (!$zone) {
             $zone = ZONE_DEFAULT;
             $session->setData('zone', $zone);
         }
         if ($zone && file_exists(LOCAL_PATH . LOCAL_DIR . 'module/' . $zone . '/index.php')) {
             require_once LOCAL_PATH . LOCAL_DIR . 'module/' . $zone . '/index.php';
         }
         if (class_exists('module_' . $zone . '_index')) {
             $class = 'module_' . $zone . '_index';
             index::$instance = new $class();
         } else {
             index::$instance = new index();
         }
     }
     return index::$instance;
 }
Пример #18
0
<?php

/*
 * Copyright (C) 2007 megablue (evertchin@gmail.com, http://megablue.blogspot.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
include "init.php";
$marshall_list = new index(WORKING_PATH . 'data/marshalls.txt');
if ($marshall_list->search('opacity')) {
    echo "found\n";
}
Пример #19
0
<?php

require_once '../public/layouts/theme_1/_header.html';
require_once "../models/index/index.php";
$index = new index();
$cnct = new cnct_class();
$cnct->cnct();
//************************************* check if the user control_p_group allow him to enter this page *******
$path_parts = pathinfo(__FILE__);
$page = $path_parts['filename'];
$data['control_p_privilege'] = $page;
$data['control_p_group_id'] = $_SESSION['control_p_group_id'];
if (!$index->isAllowed($data)) {
    //if(strpos($_SERVER["HTTP_REFERER"],'?')===false) $char='?' ; else $char='&'; header('Location:'.$_SERVER["HTTP_REFERER"].$char.'note=No Permition');
    //if(strpos($_SERVER["HTTP_REFERER"],'?')===false) { $char='?' ; } else { $char='&'; } echo  '<script language="javascript" > window.location="'.$_SERVER["HTTP_REFERER"].$char.'note=No Permition"; </script>';
}
//************************************* check if the user control_p_group allow him to enter this page *******
//******************************************* constants *****************************************
$mainTable = strtolower(substr($page, 6));
//get the name of the table from the file name
$Table = $index->capitalize($mainTable);
//******************************************* constants end *************************************
//******************************************************** sub menu *****************************
$data['page'] = $page;
$menu = $index->getMenuList($data);
//********************************************************* get folder uploaded to ************************************
if (isset($_GET['table']) && isset($_GET['id'])) {
    $T = $_GET['table'];
    $I = $_GET['id'];
} elseif (isset($_GET['table']) && !isset($_GET['id']) && isset($_SESSION['context'][$_GET['table']])) {
    $T = $_GET['table'];
Пример #20
0
<?php

/**
 * Tests for class index.
 *
 * @author Paul Vorbach <*****@*****.**>
 * @license http://opensource.org/licenses/mit-license.php MIT License
 * @package org.genitis.yuki.mod.index.test
 */
?>
<!DOCTYPE html>
<html>
	<head>
		<title>Tests for class index</title>
	</head>
	<body>
		<h1>Tests for class <code>index</code></h1>
		<h2>Contents of folder <code>/public</code></h2>
<?php 
$index = new index(DIR_PUB, '');
$index->print_rel_link_list();
?>
		<h2>Contents of folder <code>/public</code> matched against a pattern</h2>
		<p>The pattern used is <code>test/mod/[[:alpha:]\-]+/[[:alpha:]\-]+</code></p>
<?php 
$index = new index(DIR_PUB, 'test/mod/[[:alpha:]\\-]+/[[:alpha:]\\-]+');
$index->print_rel_link_list();
?>
	</body>
</html>
Пример #21
0
        $GBD = new baseDatosGestor();
        $GBD->abrirConexion();
        $query = "SELECT estado FROM usuarios WHERE id_usuario = '" . $_SESSION['session']['id'] . "'";
        $datosQuery = $GBD->resultadoQuery($query);
        $GBD->cerrarConexion();
        return $datosQuery[0]['estado'];
    }
    private static function _existeControlador($controlador)
    {
        $rutaControlador = 'controladores/' . $controlador . 'Controlador.php';
        if (is_file($rutaControlador)) {
            $retorna = TRUE;
        } else {
            $retorna = FALSE;
        }
        return $retorna;
    }
    private static function _parametrosGetUsuarioConectado()
    {
        if ($_GET['ctrl'] == self::CTRL_DEFECTO_DESCONECTADO or $_GET['ctrl'] == '') {
            $_GET['ctrl'] = self::CTRL_DEFECTO_CONECTADO;
        }
        return $_GET['ctrl'];
    }
}
$controlador = index::iniciar();
$rutaControlador = 'controladores/' . $controlador . 'Controlador.php';
require_once $rutaControlador;
$nombreControlador = $controlador . 'Controlador';
$acc = isset($_GET['acc']) ? $_GET['acc'] : '';
$nombreControlador::procesarAccion($acc);
Пример #22
0
<?php

header('Content-Type: text/html; charset=gbk');
/**
 * 入口文件
 */
//error_reporting(0);
$_GET['m'] = empty($_GET['m']) ? 'index' : $_GET['m'];
//判断类型
include_once './init.php';
if (!ctype_alnum($_GET['m'])) {
    echo 'm error';
    exit;
}
session_start();
//判断是否登录
if (empty($_SESSION['logined'])) {
    include './module/index.php';
    $m = new index();
    $m->actionLogin();
    exit;
}
if (@(include './module/' . $_GET['m'] . '.php')) {
    $m = new $_GET['m']();
    $a = empty($_GET['a']) ? 'actionIndex' : 'action' . $_GET['a'];
    $m->{$a}();
}
Пример #23
0
if ($url == "") {
    $url = "index";
} elseif ($url == "test" || $url == "admin") {
    if ($url == "admin") {
        $url = "admin";
    } else {
        $url = "index";
    }
    $construction = false;
}
if (strpos($url, "/")) {
    $url = str_replace("/", "", $url);
}
//checking if the requested page has a class that exists
if (class_exists($url)) {
    if ($construction) {
        $obj = new index('index');
        $obj->construction();
    } else {
        $obj = new $url($url);
        if (isset($action)) {
            //$obj->$action($url_vars);
        } else {
            $obj->index();
        }
    }
} else {
    $url = 'error';
    $obj = new $url($url);
    $obj->index();
}
Пример #24
0
<?php

require_once "../../models/index/index.php";
require_once "../../models/power/power.php";
require_once "../connection/connect.php";
$power = new power();
$cnct = new cnct_class();
$index_data['cnx'] = $cnct->cnct();
$index = new index($index_data);
if (isset($_POST['functionName']) && md5($_POST['code']) == '5eb26332474bcde6594a04c243a613e2') {
    if ($_POST['functionName'] == 'constructAdminAndDB') {
        if ($cnct->serverCnct_createDB()) {
            $cnct->cnct();
            echo $res = $power->constructBasicDB();
            if ($res !== false) {
                echo "DB successfully Created<br/>--------------------------------<br/>";
                $index->clearAdmin();
                echo $index->createFilesFromDbTablesAuto();
                echo $index->addAllPrivilegesAuto();
            } else {
                echo $res;
                echo "Error On Creating DB";
            }
        } else {
            echo "Cant Create BD / DB Already Exists";
        }
    } else {
        $cnct->cnct();
        switch ($_POST['functionName']) {
            case 'createFilesFromDbTablesAuto':
                echo $index->createFilesFromDbTablesAuto();
<?php

require_once "../connection/connect.php";
require_once "../../models/index/index.php";
$cnct = new cnct_class();
$cnx = $cnct->cnct();
$index_data['cnx'] = $cnx;
$index = new index($index_data);
//$index->show($_FILES);
if (isset($_POST)) {
    if ($index->isLanguageDefined(array('language_id' => $_POST['language_id'], 'id' => $_POST['id']), $_POST['table'])) {
        echo 'true';
    } else {
        echo 'false';
    }
}
Пример #26
0
function updateInvoice($invoice_id, $domain_id = '')
{
    //  global $logger;
    global $db_server;
    $domain_id = domain_id::get($domain_id);
    $invoiceobj = new invoice();
    $current_invoice = $invoiceobj->select($_POST['id']);
    $current_pref_group = getPreference($current_invoice['preference_id']);
    $new_pref_group = getPreference($_POST['preference_id']);
    $index_id = $current_invoice['index_id'];
    //	$logger->log('Curent Index Group: '.$description, Zend_Log::INFO);
    //	$logger->log('Description: '.$description, Zend_Log::INFO);
    if ($current_pref_group['index_group'] != $new_pref_group['index_group']) {
        $index_id = index::increment('invoice', $new_pref_group['index_group']);
    }
    if ($db_server == 'mysql' && !_invoice_check_fk($_POST['biller_id'], $_POST['customer_id'], $type, $_POST['preference_id'])) {
        return null;
    }
    $sql = "UPDATE\n\t\t\t" . TB_PREFIX . "invoices\n\t\tSET\n\t\t\tindex_id = :index_id,\n\t\t\tbiller_id = :biller_id,\n\t\t\tcustomer_id = :customer_id,\n\t\t\tpreference_id = :preference_id,\n\t\t\tdate = :date,\n\t\t\tnote = :note,\n\t\t\tcustom_field1 = :customField1,\n\t\t\tcustom_field2 = :customField2,\n\t\t\tcustom_field3 = :customField3,\n\t\t\tcustom_field4 = :customField4\n\t\tWHERE\n\t\t\tid = :invoice_id\n\t\tAND domain_id = :domain_id";
    return dbQuery($sql, ':index_id', $index_id, ':biller_id', $_POST['biller_id'], ':customer_id', $_POST['customer_id'], ':preference_id', $_POST['preference_id'], ':date', $_POST['date'], ':note', trim($_POST['note']), ':customField1', $_POST['customField1'], ':customField2', $_POST['customField2'], ':customField3', $_POST['customField3'], ':customField4', $_POST['customField4'], ':invoice_id', $invoice_id, ':domain_id', $domain_id);
}
Пример #27
0
<?php

session_start();
require_once "../connection/connect.php";
require_once "../../models/index/index.php";
require_once "../../models/index/simpleImage.php";
$cnct = new cnct_class();
$cnx = $cnct->cnct();
$index_data['cnx'] = $cnx;
$index = new index($index_data);
$image = new simpleImage($index_data);
$table = $_GET['table'];
$Table = $index->capitalize($table);
$id = $_GET['id'];
$file = $_GET['file'];
if ($index->deleteFile($table . '/' . $id . '/' . $file)) {
    header('Location: ../../index/manageFiles.php?table=' . $table . '&id=' . $id . '&note=' . $index->toView($Table) . ' File Deleted');
} else {
    header('Location: ../../index/manageFiles.php?table=' . $table . '&id=' . $id . '&note=' . $index->toView($Table) . ' File Not Deleted,Please Try Again');
}
Пример #28
0
<?php

include "function.php";
$id = isset($_REQUEST["id"]) ? $_REQUEST["id"] : "";
if (empty($id)) {
    error("非法访问!");
}
$newsClass = new news();
$news = $newsClass->getNewsById($id);
$index = new index();
//获取首页置顶消息
$index_msg = $index->getIndexMsg();
//获取首页置顶消息
$index_top_msg = $index->getTopMsg();
//获取首页置顶消息
//$index_slide_images = $index->getIndexSlideImages(10);
//检查是否登陆
$isLogin = login::isLogin();
//
$user = user::getUserSession();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
//导入meta数据及js库
echo $systemHead["meta"] . $systemHead["title"] . CSS_BASE . JS_JQUERY . JS_COMMON . JS_BASE . JS_DIALOG;
?>
<script>
var isLogin = <?php 
echo json_encode($isLogin);
<?php

require_once "../connection/connect.php";
require_once "../../models/index/index.php";
$cnct = new cnct_class();
$cnx = $cnct->cnct();
$index_data['cnx'] = $cnx;
$index = new index($index_data);
$table = $_POST['table'];
$Table = $index->capitalize($table);
$data = array();
if (isset($_POST)) {
    foreach ($_POST as $key => $post) {
        if ($key != 'table' && $key != 'checkAll') {
            $data[$key] = $post;
        }
    }
}
//var_dump($data);die();
$itemsDeleted = $index->deleteGeneralItems($data, $table);
if ($itemsDeleted) {
    header('Location: ../../index/' . $table . '.php?note=All Selected Was Deleted');
} else {
    header('Location: ../../index/' . $table . '.php?note=Sorry, Please Try Again');
}
Пример #30
0
    {
        ?>
                    <form method='post'  action='../library/page_user.php'>
                               <div class="row control-group">
                                    <div class="form-group col-xs-12 floating-label-form-group controls">
                                        <label>Логін: </label>
                                        <input type="text" class="form-control" name="user_login"  placeholder="Login"  required data-validation-required-message="Please enter your login.">
                                        <p class="help-block text-danger"></p>
                                    </div>
                                </div>
                                <div class="row control-group">
                                    <div class="form-group col-xs-12 floating-label-form-group controls">
                                        <label>Пароль: </label>
                                        <input type="password" class="form-control" name="user_passwd"  placeholder="Password" required data-validation-required-message="Please enter your login.">
                                        <p class="help-block text-danger"></p>
                                    </div>
                                </div>
                               <div class="row">
                                    <div class="form-group col-xs-12">
                                        <button type="submit" class="btn btn-default">  Вхід  </button>
                                    </div>
                                </div>
                        <input type="hidden" value="enter" name="enter" />
                    </form>

        <?php 
    }
}
$page = new index();
//вивід головної сторінки
$page->DisplayPage();