当前位置: 首页>>代码示例>>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;未经允许,请勿转载。