當前位置: 首頁>>代碼示例>>PHP>>正文


PHP set_dependencies函數代碼示例

本文整理匯總了PHP中set_dependencies函數的典型用法代碼示例。如果您正苦於以下問題:PHP set_dependencies函數的具體用法?PHP set_dependencies怎麽用?PHP set_dependencies使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了set_dependencies函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: set_dependencies

<?php

include '../../../Conf/Include.php';
Session::InitSession();
set_dependencies(array("AdminController"));
$header = new Http\Header();
if (!isset($_SESSION['login'])) {
    $header->redirect("Login.php");
}
$usuario = $_SESSION['login']['user'];
$rol = $_SESSION['login']['rol'];
$nombre = $_SESSION['login']['nombre'];
$mail = $_SESSION['login']['email'];
$activo = $_SESSION['login']['activo'];
$id_user = $_SESSION['login']['id'];
$imagen = $_SESSION['login']['imagen'];
if (\SivarApi\Tools\Validation::Is_Empty_OrNull($imagen)) {
    $imagen = "avatar.png";
}
if ($activo == 0) {
    $header->redirect("cuenta_desactivada.php");
}
$adminc = new AdminController();
if (isset($_POST['guardar_superpermisos']) && isset($_POST['txt_superpermisos'])) {
    if (!\SivarApi\Tools\Validation::Is_Empty_OrNull($_POST['txt_superpermisos'])) {
        $nombre_rol = $_POST['txt_superpermisos'];
        $is_ok = $adminc->add_rols($nombre_rol);
        if ($is_ok) {
            echo "<script>alert('Se agrego nuevo privilegio');</script>";
        } else {
            echo "<script>alert('No se pudo agregar el nuevo privilegio');</script>";
開發者ID:E89son,項目名稱:LieisonCMS,代碼行數:31,代碼來源:dashboard_gestion_usuarios.php

示例2: files

*@copyright (c) 2015, Lieison
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   SOFTWARE. 
* 
*@version 1.0
*@todo Lieison S.A de C.V 
* 
* 
* 
*/
include '../../../Conf/Include.php';
set_dependencies(array("ProspectController", "AdminController"));
$prospecto = new ProspectController();
$arrayp = array("nombre" => $_REQUEST['nombre'], "direccion" => $_REQUEST['direccion1'], "direccion2" => $_REQUEST['direccion2'], "provincia" => $_REQUEST['provincia'], "ciudad" => $_REQUEST['ciudad'], "id_pais" => $_REQUEST['pais'], "zip" => $_REQUEST['zip'], "telefono" => $_REQUEST['telefono'], "fax" => $_REQUEST['fax'], "pagina_web" => $_REQUEST['web'], "email" => $_REQUEST['mail'], "facebook" => $_REQUEST['facebook'], "twitter" => $_REQUEST['twitter'], "notas" => $_REQUEST['notas'], "fecha" => FunctionsController::get_date(), "estado" => 1);
echo $prospecto->Add_Prospect($arrayp);
開發者ID:E89son,項目名稱:LieisonCMS,代碼行數:31,代碼來源:ajax_add_prospect.php

示例3: set_dependencies

<?php

include '../../../../../Conf/Include.php';
set_dependencies(array("TaskController"));
$id = $_REQUEST['id'] ?: NULL;
$type = $_REQUEST['type'] ?: NULL;
if (SivarApi\Tools\Validation::Is_Empty_OrNull($id)) {
    exit;
}
$task = new TaskController();
$r = $task->set_task_type($id, $type);
echo $r;
unset($r);
exit;
開發者ID:E89son,項目名稱:LieisonCMS,代碼行數:14,代碼來源:state_action.php

示例4: set_dependencies

<?php

include '../../../../Conf/Include.php';
//INICIAMOS SESION
Session::InitSession();
//CARGAMOS LA DEPENDENCIA
set_dependencies(array("MessageController"));
$messages = new MessageController();
$r = $messages->GetMessageTrash(Session::GetSession("login", "id"), MESSAGE_TO);
$a = array("count" => sizeof($r), "data" => $r);
unset($messages);
echo json_encode($a);
exit;
開發者ID:E89son,項目名稱:LieisonCMS,代碼行數:13,代碼來源:tray_trash.php

示例5: set_dependencies

<?php

include '../../../Conf/Include.php';
Session::InitSession();
set_dependencies(array("AdminController", "MessageController"));
$messagecontroller = new MessageController();
$id_user = $_SESSION['login']['id'];
$count = $messagecontroller->GetMessageCountFrom($id_user);
$msjto = $messagecontroller->GetMessageFrom($id_user, null);
$count_submsj = 0;
if (count($msjto) == 0) {
    $msjto = $messagecontroller->GetMessageTo($id_user, null);
}
foreach ($msjto as $k => $v) {
    $r = $messagecontroller->GetCountSubMessage($v['id_mensaje'], $id_user);
    $count_submsj += count($r);
}
$count += $count_submsj;
if ($count == 0) {
    echo 0;
} else {
    echo $count;
}
unset($messagecontroller);
exit;
開發者ID:E89son,項目名稱:LieisonCMS,代碼行數:25,代碼來源:count_inbox.php

示例6: set_dependencies

<?php

include '../../../../Conf/Include.php';
set_dependencies(array("LogsController"));
$dir = FunctionsController::GetRootUrl("task");
echo $dir . "<br>";
if ($dir) {
    echo "existe";
} else {
    echo "no existe";
}
$log = new LogsController("../../task/");
$log->SetLog("prueba");
$log->CloseLog();
開發者ID:E89son,項目名稱:LieisonCMS,代碼行數:14,代碼來源:test.php

示例7: set_dependencies

<?php

include '../../../Conf/Include.php';
set_dependencies(array("PluginController"));
//print_r($_FILES['']);
//DIRRECTORIO DONDE SE GUARDAN LOS MODULOS
$target_dir = "../plugins/files/";
//ARCHIVO DONDE SE ENCUENTRA EL PLUGIN
$target_file = $target_dir . basename($_FILES["plugin"]["name"]);
//VERIFICAMOS EL TIPO DE ARCHIVO DEBE SER .ZIP
$FileType = pathinfo($target_file, PATHINFO_EXTENSION);
//VERIFICAMOS EL NOMBRE
$name = $_FILES["plugin"]["name"];
//INSTANCIAMOS EL HEADER
$header = new \Http\Header();
//VERIFICAMOS SI EXISTE EL ARCHIVO ANTERIORMENTE ANTES DE SUBIRLO
if (file_exists($target_file)) {
    unlink($target_file);
}
//VERIFICAMOS EL TIPO DE ARCHIVO
if ($FileType != "zip") {
    $header->redirect("dashboard_index.php?error=nofile");
    exit;
}
//PROCEDEREMOS A SUBIR EL ARCHIVO
$result = move_uploaded_file($_FILES["plugin"]["tmp_name"], $target_file);
echo $result . $_FILES["plugin"]["tmp_name"];
if (!$result) {
    $header->redirect("dashboard_index.php?error=noupload");
    exit;
}
開發者ID:E89son,項目名稱:LieisonCMS,代碼行數:31,代碼來源:UploadPlugin.php

示例8: set_dependencies

       "other_docs":ODocs,
       "title":title,
       "deadline": deadline,
       "hourdead": hourdead,
       "id_client": id_client,
       "client_description": client_description,
       "id_user": id_user,
       "user_comment": user_comment,
       "user_activate":user_activate
       
  };
* 
*/
include '../../../../Conf/Include.php';
$type = $_REQUEST['type'] ?: null;
set_dependencies(array("TaskController", "LogsController", "MessageController"));
if (SivarApi\Tools\Validation::Is_Empty_OrNull($type)) {
    echo 0;
    exit;
}
try {
    $task = new TaskController();
    Session::InitSession();
    $id_user = Session::GetSession("login", "id");
    $encript = new \SivarApi\Tools\Encriptacion\Encriptacion();
    $id_mt = $encript->Md5Encrypt(mt_rand(0, 1000) . mt_rand(100, 500) . $id_user . $_REQUEST['title']);
    $box_files = $_REQUEST['box_nodes'] ?: "";
    $mensaje = htmlspecialchars("<b>La tarea Consiste en :</b><br> " . $_REQUEST['client_description'] . "<div align='center'><a target='_blank' class='btn btn-circle green-haze btn-sm ' href='" . FunctionsController::GetUrl("task/show_task.php?id={$id_mt}") . "'>Ver tarea ...</a></div>", ENT_QUOTES);
    $asunto = " Tarea :" . $_REQUEST['title'];
    $msj = new MessageController();
    $id_msj = $msj->SetmessageLastId($_REQUEST['id_user'], $id_user, $mensaje, $asunto);
開發者ID:E89son,項目名稱:LieisonCMS,代碼行數:31,代碼來源:savetask.php


注:本文中的set_dependencies函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。