当前位置: 首页>>代码示例>>PHP>>正文


PHP getAction函数代码示例

本文整理汇总了PHP中getAction函数的典型用法代码示例。如果您正苦于以下问题:PHP getAction函数的具体用法?PHP getAction怎么用?PHP getAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getAction函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    global $arrConfModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    $pNet = new paloNetwork();
    $arrEths = $pNet->obtener_interfases_red_fisicas();
    //actions
    $accion = getAction();
    switch ($accion) {
        case "edit_network":
            $content = editNetwork($smarty, $module_name, $local_templates_dir, $pNet);
            break;
        case "edit_interface":
            $content = editInterface($smarty, $module_name, $local_templates_dir, $pNet, $arrEths);
            break;
        case "save_network":
            $content = saveNetwork($smarty, $module_name, $local_templates_dir, $pNet);
            break;
        case "save_interface":
            $content = saveInterface($smarty, $module_name, $local_templates_dir, $pNet);
            break;
        default:
            $content = formNetwork($smarty, $module_name, $local_templates_dir, $pNet, $arrEths);
            break;
    }
    return $content;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:31,代码来源:index.php

示例2: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion
    $pDB = new paloDB($arrConf['dsn_conn_database']);
    //actions
    $accion = getAction();
    $content = "";
    switch ($accion) {
        case 'save':
            $content = savePuerto($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case 'new':
        case 'view':
        case 'edit':
            $content = NewViewPuerto($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $accion);
            break;
        case 'delete':
            $content = deletePuertos($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case 'cancel':
            $content = reportPuertos($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        default:
            $content = reportPuertos($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
    }
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:32,代码来源:index.php

示例3: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    //conexion resource
    $pConfig = new paloConfig("/etc", "amportal.conf", "=", "[[:space:]]*=[[:space:]]*");
    $arrConfig = $pConfig->leer_configuracion(false);
    $dsnAsteriskCdr = $arrConfig['AMPDBENGINE']['valor'] . "://" . $arrConfig['AMPDBUSER']['valor'] . ":" . $arrConfig['AMPDBPASS']['valor'] . "@" . $arrConfig['AMPDBHOST']['valor'] . "/asteriskcdrdb";
    $pDB_cdr = new paloDB($dsnAsteriskCdr);
    //asteriskcdrdb -> CDR
    $pDB_billing = new paloDB("sqlite3:///{$arrConf['elastix_dbdir']}/rate.db");
    //sqlite3 -> rate.db
    //actions
    $accion = getAction();
    $content = "";
    switch ($accion) {
        case 'graph':
            $content = graphLinks($smarty, $module_name, $local_templates_dir);
            break;
        case 'imageTop10Salientes':
        case 'imageTop10Entrantes':
            // The following outputs image data directly and depends on rawmode=yes
            executeImage($module_name, $accion);
            $content = '';
            break;
        default:
            $content = reportReportCall($smarty, $module_name, $local_templates_dir, $pDB_cdr, $pDB_billing, $arrConf, $arrLang);
            break;
    }
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:31,代码来源:index.php

示例4: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoEmaillist.class.php";
    //include file language agree to elastix configuration
    //if file language not exists, then include language by default (en)
    $lang = get_language();
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $lang_file = "modules/{$module_name}/lang/{$lang}.lang";
    if (file_exists("{$base_dir}/{$lang_file}")) {
        include_once "{$lang_file}";
    } else {
        include_once "modules/{$module_name}/lang/en.lang";
    }
    //global variables
    global $arrConf;
    global $arrConfModule;
    global $arrLang;
    global $arrLangModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    $arrLang = array_merge($arrLang, $arrLangModule);
    //folder path for custom templates
    $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    //conexion resource
    $pDB = new paloDB($arrConf['dsn_conn_database']);
    //actions
    $action = getAction();
    $content = "";
    switch ($action) {
        case "new_emaillist":
            $content = viewFormEmaillist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case "save_newList":
            $content = saveNewList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case "new_memberlist":
        case "remove_memberlist":
            $content = viewFormMemberList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case "save_newMember":
        case "save_removeMember":
            $content = saveNewMember($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case "delete":
            $content = deleteEmailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case "view_memberlist":
            $content = viewMemberList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case "export":
            $content = exportMembers($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        default:
            $content = reportEmailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
    }
    return $content;
}
开发者ID:hardikk,项目名称:HNH,代码行数:60,代码来源:index.php

示例5: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    global $arrConf;
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]);
    //user credentials
    global $arrCredentials;
    //actions
    $action = getAction();
    $content = "";
    switch ($action) {
        case "save_new":
            $content = sendNewSendFax($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case 'checkFaxStatus':
            $content = checkFaxStatus();
            break;
        default:
            // view_form
            $content = viewFormSendFax($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
    }
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:26,代码来源:index.php

示例6: writeToLog

    function writeToLog()
    {
        global $modx;
        if ($this->entry['internalKey'] == "") {
            $this->logError("internalKey not set.");
            return;
        }
        if ($this->entry['action'] == "") {
            $this->logError("action not set.");
            return;
        }
        if ($this->entry['msg'] == "") {
            include_once "actionlist.inc.php";
            $this->entry['msg'] = getAction($this->entry['action'], $this->entry['itemId']);
            if ($this->entry['msg'] == "") {
                $this->logError("couldn't find message to write to log.");
                return;
            }
        }
        $sql = 'INSERT INTO ' . $modx->getFullTableName('manager_log') . '
			(timestamp, internalKey, username, action, itemid, itemname, message) VALUES
			(\'' . time() . '\',
			 \'' . $modx->db->escape($this->entry['internalKey']) . '\',
			 \'' . $modx->db->escape($this->entry['username']) . '\',
			 \'' . $modx->db->escape($this->entry['action']) . '\',
			 \'' . $modx->db->escape($this->entry['itemId']) . '\',
			 \'' . $modx->db->escape($this->entry['itemName']) . '\',
			 \'' . $modx->db->escape($this->entry['msg']) . '\')';
        if (!($rs = $modx->db->query($sql))) {
            $this->logError("Couldn't save log to table! " . mysql_error());
            return true;
        }
    }
开发者ID:jgrau,项目名称:MODx-CMS,代码行数:33,代码来源:log.class.inc.php

示例7: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    global $arrConf;
    //include framework lib form
    include_once "libs/paloSantoForm.class.php";
    //include email configuration files
    include_once "configs/email.conf.php";
    include_once "libs/cyradm.php";
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]);
    //user credentials
    global $arrCredentials;
    $accion = getAction();
    $content = "";
    switch ($accion) {
        case "update":
            $content = updateAntispam($smarty, $module_name, $local_templates_dir, $arrConf);
            break;
        default:
            $content = formAntispam($smarty, $module_name, $local_templates_dir, $arrConf);
            break;
    }
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:26,代码来源:index.php

示例8: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    global $arrConfModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $pDB = new paloDB($arrConf['dsn_conn_database']);
    //actions
    $action = getAction();
    $content = "";
    switch ($action) {
        //         case "save_dhcpclient":
        //             $content = saveNewDhcpClient($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
        //             break;
        case "new_dhcpclient":
            $content = viewFormDhcpClientlist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case "see_dhcpclient":
            $content = viewFormDhcpClientlist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
            //         case "delete_list":
            //             $content = delete_emailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            //             break;
        //         case "delete_list":
        //             $content = delete_emailList($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
        //             break;
        default:
            $content = reportDhcpClientlist($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
    }
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:35,代码来源:index.php

示例9: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    global $arrConf;
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $dsn = generarDSNSistema('asteriskuser', 'asteriskcdrdb');
    $pDB = new paloDB($dsn);
    //user credentials
    global $arrCredentials;
    $action = getAction();
    $content = "";
    switch ($action) {
        case 'delete':
            $content = deleteRecord($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case 'download':
            $content = downloadFile($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "display_record":
            $content = display_record($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        default:
            $content = reportMonitoring($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
    }
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:28,代码来源:index.php

示例10: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //global variables
    global $arrConf;
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $pDB = new paloDB($arrConf['elastix_dsn']['elastix']);
    //return array("idUser"=>$idUser,"id_organization"=>$idOrganization,"userlevel"=>$userLevel1,"domain"=>$domain);
    global $arrCredentials;
    //actions
    $accion = getAction();
    switch ($accion) {
        case 'save':
            $content = saveExtensionSettings($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case 'checkFaxStatus':
            $content = checkFaxStatus('getFaxStatus', $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case 'showSendFax':
            $content = showSendFax($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case 'sendNewFax':
            $content = sendNewFax($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        case 'faxAttachmentUpload':
            $content = faxAttachmentUpload($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
        default:
            $content = showExtensionSettings($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
    }
    return $content;
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:34,代码来源:index.php

示例11: writeToLog

 function writeToLog()
 {
     global $modx;
     $tbl_manager_log = $modx->getFullTableName('manager_log');
     if ($this->entry['internalKey'] == "") {
         $modx->webAlertAndQuit("Logging error: internalKey not set.");
     }
     if (empty($this->entry['action'])) {
         $modx->webAlertAndQuit("Logging error: action not set.");
     }
     if ($this->entry['msg'] == "") {
         include_once "actionlist.inc.php";
         $this->entry['msg'] = getAction($this->entry['action'], $this->entry['itemId']);
         if ($this->entry['msg'] == "") {
             $modx->webAlertAndQuit("Logging error: couldn't find message to write to log.");
         }
     }
     $fields['timestamp'] = time();
     $fields['internalKey'] = $modx->db->escape($this->entry['internalKey']);
     $fields['username'] = $modx->db->escape($this->entry['username']);
     $fields['action'] = $this->entry['action'];
     $fields['itemid'] = $this->entry['itemId'];
     $fields['itemname'] = $modx->db->escape($this->entry['itemName']);
     $fields['message'] = $modx->db->escape($this->entry['msg']);
     $insert_id = $modx->db->insert($fields, $tbl_manager_log);
     if (!$insert_id) {
         $modx->messageQuit("Logging error: couldn't save log to table! Error code: " . $modx->db->getLastError());
     } else {
         $limit = isset($modx->config['manager_log_limit']) ? intval($modx->config['manager_log_limit']) : 3000;
         $trim = isset($modx->config['manager_log_trim']) ? intval($modx->config['manager_log_trim']) : 100;
         if ($insert_id % $trim === 0) {
             $modx->rotate_log('manager_log', $limit, $trim);
         }
     }
 }
开发者ID:radist,项目名称:modx.evo.custom,代码行数:35,代码来源:log.class.inc.php

示例12: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoOverall_setting.class.php";
    require_once "modules/{$module_name}/libs/JSON.php";
    //include file language agree to elastix configuration
    //if file language not exists, then include language by default (en)
    $lang = get_language();
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $lang_file = "modules/{$module_name}/lang/{$lang}.lang";
    if (file_exists("{$base_dir}/{$lang_file}")) {
        include_once "{$lang_file}";
    } else {
        include_once "modules/{$module_name}/lang/en.lang";
    }
    //global variables
    global $arrConf;
    global $arrConfModule;
    global $arrLang;
    global $arrLangModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    $arrLang = array_merge($arrLang, $arrLangModule);
    //folder path for custom templates
    $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    //conexion resource
    $pDB = new paloDB($arrConf['cadena_dsn']);
    $pACL = new paloACL($arrConf['elastix_dsn']['acl']);
    //actions
    $action = getAction();
    switch ($action) {
        case "update":
            $content = updateNotification($pDB);
            break;
        case 'refresh':
            $content = refreshNotification($pDB);
            break;
        case "update_rate":
            $content = updateRate($pDB, $pACL);
            break;
        case 'refresh_rate':
            $content = refreshRate($pDB, $pACL);
            break;
        default:
            // view_form
            $content = viewFormOverall_setting($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
    }
    return $content;
}
开发者ID:hardikk,项目名称:HNH,代码行数:51,代码来源:index.php

示例13: _moduleContent

function _moduleContent(&$smarty, $module_name)
{
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    include_once "modules/{$module_name}/libs/paloSantoRegestion.class.php";
    include_once "modules/{$module_name}/libs/paloSantoCrearcampania.class.php";
    //include file language agree to elastix configuration
    //if file language not exists, then include language by default (en)
    $lang = get_language();
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $lang_file = "modules/{$module_name}/lang/{$lang}.lang";
    if (file_exists("{$base_dir}/{$lang_file}")) {
        include_once "{$lang_file}";
    } else {
        include_once "modules/{$module_name}/lang/en.lang";
    }
    //global variables
    global $arrConf;
    global $arrConfModule;
    global $arrLang;
    global $arrLangModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    $arrLang = array_merge($arrLang, $arrLangModule);
    //folder path for custom templates
    $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    //conexion resource
    $pDB = new paloDB($arrConf['dsn_conn_database']);
    //actions
    $action = getAction();
    $content = "";
    switch ($action) {
        // Ver form con información de la campaña padre para proceder a armar la regestión
        case 'view_edit':
            $content = viewFormCrearcampaña($smarty, $module_name, $local_templates_dir, &$pDB, $arrConf);
            break;
            // Grabar la regestión
        // Grabar la regestión
        case 'save_edit':
        case 'save_new':
            saveNewRegestion($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            $content = reportRegestion($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
            // Reporte de campañas padres
        // Reporte de campañas padres
        default:
            $content = reportRegestion($smarty, $module_name, $local_templates_dir, $pDB, $arrConf);
            break;
    }
    return $content;
}
开发者ID:veraveramanolo,项目名称:cpc2c_uio,代码行数:51,代码来源:index.php


注:本文中的getAction函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。