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


PHP get_action函数代码示例

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


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

示例1: index

 public function index()
 {
     if (IS_POST) {
         $post_data = I('post.');
         $post_data['first'] = $post_data['rows'] * ($post_data['page'] - 1);
         $map = array();
         $map = $this->_search();
         $total = $this->Model->where($map)->count();
         if ($total == 0) {
             $_list = '';
         } else {
             $_list = $this->Model->where($map)->order($post_data['sort'] . ' ' . $post_data['order'])->limit($post_data['first'] . ',' . $post_data['rows'])->select();
         }
         $option["status"] = array(0 => '禁用', 1 => '启用');
         foreach ($_list as $list_key => $list_one) {
             foreach ($list_one as $list_one_key => $list_one_field) {
                 if ($option[$list_one_key] != '') {
                     $_list[$list_key][$list_one_key] = $option[$list_one_key][$list_one_field];
                 }
             }
             $_list[$list_key]['action_title'] = get_action($_list[$list_key]['action_id'], 'title');
             $_list[$list_key]['user_nickname'] = get_nickname($_list[$list_key]['user_id']);
             $_list[$list_key]["create_time"] = date("Y年m月d日", $_list[$list_key]["create_time"]);
             $operate_menu = '';
             if (Is_Auth('Admin/ActionLog/edit')) {
                 $operate_menu = $operate_menu . "<a href='#' onclick=\"Submit_Form('ActionLog_Form','ActionLog_Data_List','" . U('edit', array('id' => $_list[$list_key]['id'])) . "','','编辑数据','');\">查看行为日志</a>";
             }
             $_list[$list_key]['operate'] = $operate_menu;
         }
         $data = array('total' => $total, 'rows' => $_list);
         $this->ajaxReturn($data);
     } else {
         $this->display();
     }
 }
开发者ID:xxg3053,项目名称:Gms,代码行数:35,代码来源:ActionLogController.class.php

示例2: display_resource_action

function display_resource_action()
{
    $get_resource = display_data('resource');
    $display = '';
    $count_resource = 0;
    $count_action = 0;
    foreach ($get_resource as $value) {
        $count_resource++;
        $val = $value['resource'];
        $id = 'resource' . $value['id'];
        $display .= "<tr><td class='privilege_display'><label id='{$id}'\n        name='{$val}'>{$val}</label>&nbsp&nbsp</td> ";
        // Getting action table data.
        $get_action = get_action();
        foreach ($get_action as $value_action) {
            $count_action++;
            $val_action = $value_action['operation'];
            $id_action = $id . 'action' . $value_action['id'];
            $display .= "<td class='privilege_display'>\n            <input id='{$id_action}' type='checkbox' name='{$val_action}' value='{$val_action}'>\n            &nbsp{$val_action} &nbsp&nbsp </td> ";
        }
        if ($count_action >= 2) {
            $display .= "<td class='privilege_display'>\n            <input id='all_{$id}' type='checkbox' name='all' value='all_{$id}'>\n            &nbsp all &nbsp&nbsp </td> ";
        }
        $display .= '<br/> </tr>';
    }
    //end foreach
    $count_action /= 2;
    $display .= "<input id='count_action' type='hidden' name='count_action' value='{$count_action}'>";
    $display .= "<input id='count_resource' type='hidden' name='count_resource' value='{$count_resource}'>";
    return $display;
}
开发者ID:amitkmr200k,项目名称:project_form,代码行数:30,代码来源:admin_privilege.php

示例3: set_action

function set_action($me)
{
    $time = time();
    $q = db('insert into actions (me, time) values (:me, :time)');
    $q->bindParam(':me', $me);
    $q->bindParam(':time', $time);
    $q->execute();
    get_action($me);
}
开发者ID:obiloud,项目名称:sc,代码行数:9,代码来源:soundcloud.php

示例4: onBootstrap

 public function onBootstrap(MvcEvent $e)
 {
     $controller_id = (string) '';
     $action_id = (string) '';
     get_action($controller_id, $action_id);
     $eventManager = $e->getApplication()->getEventManager();
     $eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'onDispatchError'), 200);
     if (IS_TEST) {
         $this->loggingAccess($e->getRequest());
     }
     $this->createDbAdapter($e);
     $valid = $this->bootstrapSession($e);
     if (!$valid && 'failed' != $controller_id) {
         $this->toRoute = array('controller' => 'failed');
         session_destroy();
     } else {
         if ('failed' != $controller_id) {
             $this->auth = new AuthPlugin();
             $login = $this->auth->isLogin();
             if (RESTRICT_LOGIN) {
                 $user_no = $this->auth->get('user_no');
                 $storage = $e->getApplication()->getServiceManager()->get('Session\\Storage\\DbSessionStorage');
                 $storage->renewRestrictLogin($user_no);
             }
             if ($login && 'index' == $controller_id && ('index' == $action_id || !$action_id)) {
                 $this->toRoute = array('controller' => 'menu', 'action' => 'top');
             } else {
                 if (!$login && 'index' != $controller_id) {
                     $this->toRoute = array('controller' => 'index', 'action' => 'index');
                     $container = new ContainerPlugin();
                     $container->setContainer('index');
                     $uri = filter_input(INPUT_SERVER, "REQUEST_URI");
                     $container->set('uri', $uri);
                     $container->set('err_msg', 'セッションが切れました。');
                     // save request data
                     $p = $e->getRequest()->getPost()->toArray();
                     if (!$login && $this->toRoute && $p) {
                         $container->setContainer($controller_id);
                         $container->set('postRequest', json_encode($p));
                     }
                 }
             }
             $this->bootTranslator($e);
         }
     }
     $eventManager->attach(MvcEvent::EVENT_DISPATCH, array($this, 'onDispatch'), 100);
     if ($this->toRoute) {
         $eventManager->getSharedManager()->attach('Zend\\Mvc\\Controller\\AbstractActionController', 'dispatch', function ($e) {
             $controller = $e->getTarget();
             $controller->plugin('redirect')->toRoute('app', $this->toRoute);
         });
         return false;
     }
     $moduleRouteListener = new ModuleRouteListener();
     $moduleRouteListener->attach($eventManager);
 }
开发者ID:jonathan1212,项目名称:zf2,代码行数:56,代码来源:Module.php

示例5: execute

function execute($app, $action)
{
    //传递进来的参数为空的话,才去获取URL的地址
    if (empty($app)) {
        $app = get_app();
    }
    if (empty($action)) {
        $action = get_action();
    }
    $new_action = $action . '_Action';
    $ac = new $new_action();
    $ac->execute();
}
开发者ID:pantingwen,项目名称:sanwenphp,代码行数:13,代码来源:functions.php

示例6: prepare_action

/**
 * Prepare the action
 */
function prepare_action()
{
    global $_posted_params, $_action;
    global $_display_algorithm_descriptions, $_display_algorithm_categories, $_display_image;
    global $_algorithms, $_algorithm;
    $_posted_params = get_posted_params();
    $_action = get_action($_posted_params);
    $_display_algorithm_descriptions = empty($_COOKIE['_aa_no_algorithm_description']);
    $_display_algorithm_categories = empty($_COOKIE['_aa_no_algorithm_categories']);
    $_display_image = empty($_COOKIE['_aa_no_image']);
    $_algorithms = get_algorithms($_display_algorithm_descriptions);
    $_algorithm = get_algorithm($_posted_params, $_algorithms);
}
开发者ID:gavinkou,项目名称:astronomical-algorithms,代码行数:16,代码来源:controller.php

示例7: onBeforeRender

 public function onBeforeRender()
 {
     switch (get_action()) {
         case 'delete':
             $this->onDelete();
             break;
         case 'add':
         case 'edit':
             $this->add($this->getForm());
             break;
         default:
             $this->add($this->getView());
             break;
     }
 }
开发者ID:moiseh,项目名称:codegen,代码行数:15,代码来源:Crud.php

示例8: foreach

        } else {
            foreach ($__LIST__ as $key => $vo) {
                $mod = $i % 2;
                ++$i;
                ?>
<tr>
            <td><input class="ids" type="checkbox" name="ids[]" value="<?php 
                echo $vo["id"];
                ?>
" /></td>
			<td><?php 
                echo $vo["id"];
                ?>
 </td>
			<td><?php 
                echo get_action($vo['action_id'], 'title');
                ?>
</td>
			<td><?php 
                echo get_nickname($vo['user_id']);
                ?>
</td>
			<td><span><?php 
                echo time_format($vo["create_time"]);
                ?>
</span></td>
			<td><a href="<?php 
                echo U('Action/edit?id=' . $vo['id']);
                ?>
">详细</a>
				<a class="confirm ajax-get" href="<?php 
开发者ID:ChenwayWong,项目名称:ztdn,代码行数:31,代码来源:0b569c8b223da3410839977f41808d4e.php

示例9: format_date

 $date_relance = $level["level_min_date_relance"];
 $list_dates[$date_relance] = format_date($date_relance);
 if ($printed) {
     $list_dates_relance[$date_relance] = $list_dates[$date_relance];
     $dr = explode("-", $date_relance);
     $list_dates_sort[$date_relance] = mktime(0, 0, 0, $dr[1], $dr[2], $dr[0]);
 }
 //Tri des dates
 if (count($list_dates_sort)) {
     arsort($list_dates_sort);
 }
 print "<td>{$niveau_min}</td>";
 print "<td>" . $list_dates[$date_relance] . "</td>";
 print "<td>" . ($printed ? "x" : "") . "</td>";
 print "<td>{$niveau_normal}</td>";
 print "<td>" . get_action($r["id_empr"], $niveau_min, $niveau_normal) . "</td>";
 print "<td><input type='button' class='bouton_small' value='" . $msg["relance_row_valid"] . "' onClick=\"this.form.act.value='solo'; this.form.relance_solo.value='" . $r["id_empr"] . "'; {$script}\"/>&nbsp;";
 //Si mail de rappel affecté au responsable du groupe
 $requete = "select id_groupe,resp_groupe from groupe,empr_groupe where id_groupe=groupe_id and empr_id=" . $r["id_empr"] . " and resp_groupe and mail_rappel limit 1";
 $res = pmb_mysql_query($requete);
 if (pmb_mysql_num_rows($res) > 0) {
     $requete = "select id_empr, empr_mail from empr where id_empr='" . pmb_mysql_result($res, 0, 1) . "'";
     $result = pmb_mysql_query($requete);
     $has_mail = pmb_mysql_result($result, 0, 1) ? 1 : 0;
 } else {
     $has_mail = $r["empr_mail"] ? 1 : 0;
 }
 if ($niveau_min) {
     print "<input type='button' class='bouton_small' value='" . $msg["relance_row_print"] . "' onClick=\"openPopUp('pdf.php?pdfdoc=lettre_retard&id_empr=" . $r["id_empr"] . "&niveau=" . $niveau_min . "','lettre', 600, 500, -2, -2, 'toolbar=no, dependent=yes, resizable=yes'); this.form.act.value='solo_print'; this.form.relance_solo.value='" . $r["id_empr"] . "'; {$script}\"/>";
     if (($mailretard_priorite_email == 1 || $mailretard_priorite_email == 2) && $has_mail && ($niveau_min < 3 || $mailretard_priorite_email_3 == 1 && $niveau_min >= 3)) {
         print "<input type='button' class='bouton_small' value='" . $msg["relance_row_mail"] . "' onClick=\"this.form.act.value='solo_mail'; this.form.relance_solo.value='" . $r["id_empr"] . "'; {$script}\"/>";
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:relance.inc.php

示例10: header

                // redirect back to homepage
                header("Location: http://www." . get_action(4));
                die;
            } else {
                $et->load("console")->fire_forget(get_action(3));
            }
            $ED->email = " Job received with action: " . get_action(3) . ". " . $the_callback_email . " will be notified once this job is completed.";
        } catch (Console_exception $e) {
            $ED->errors[] = $e->getMessage();
        }
        break;
    case "404":
        // import wikipedia article
        $ED->domain = get_action(3);
        $ED->topics = get_action(4);
        try {
            $ED->results = $et->load("wikipedia")->set_domain($ED->domain)->import($ED->topics);
        } catch (Wikipedia_exception $e) {
            $ED->errors[] = $e->getMessage();
        }
        break;
}
/**
 * Notify administrators.
 */
if (in_array(get_action(2), array("create", "quick", "suggest", "import", "404"))) {
    if (wp_mail($the_callback_email, "Ethach " . ucfirst(get_action()), json_encode($ED))) {
    }
    $ED->email = "Emailed sent.";
}
output_json($ED);
开发者ID:Aranjedeath,项目名称:sitegenerator,代码行数:31,代码来源:index.php

示例11: MW_ActionRequest

 function MW_ActionRequest($http_request)
 {
     $name = $http_request->get_param(MW_REQVAR_ACTION);
     $this->action = $name !== null ? get_action($name) : get_default_action();
 }
开发者ID:SnowyYANG,项目名称:miniwiki,代码行数:5,代码来源:actions.php

示例12: htmlspecialchars

        echo '<div class="debug">' . htmlspecialchars('DEBUG: ' . $msg, ENT_NOQUOTES), "</div>\n";
    }
}
ini_set('include_path', ini_get('include_path') . ':.');
include 'miniwiki.php';
miniwiki_boot();
$req =& get_request("MW_PageRequest");
$page = $req->get_page();
set_current_page($page);
$auth =& get_auth();
if ($auth->is_invalid()) {
    add_info_text(_t('Invalid login.'));
}
$storage =& get_storage();
if (!$auth->is_logged && $storage->requires_login()) {
    $action = get_action(MW_ACTION_LOGIN);
    $action->handle();
}
$req =& get_request("MW_ActionRequest");
$action = $req->get_action();
if ($action === null) {
    trigger_error(_t("Unknown action."), E_USER_ERROR);
}
while ($action !== null) {
    if (!$action->is_valid()) {
        trigger_error(_t("Unknown action."), E_USER_ERROR);
        break;
    } elseif (!$action->is_permitted()) {
        add_info_text(_t('Insufficient user rights. Access denied to action: %0%', _t($action->get_name())));
        render_ui(MW_LAYOUT_HEADER);
        render_ui(MW_LAYOUT_FOOTER);
开发者ID:SnowyYANG,项目名称:miniwiki,代码行数:31,代码来源:main.php

示例13: get_current_page

# $Id$
# (c)2005,2006 Stepan Roh <src@srnet.cz>
# Free to copy, free to modify, NO WARRANTY
/** @file
 * edit Wiki page
 */
$page =& get_current_page();
$req =& get_request("MW_EditRequest");
render_ui(MW_LAYOUT_HEADER, _t("Editing %0%", $page->name));
if ($req->is_preview() && $page->has_content) {
    echo '<div class="page-content">';
    $page->render();
    echo '</div>', "\n";
}
echo '<div class="page-edit">', "\n";
$action = get_action(MW_ACTION_EDIT);
$link = $action->link();
echo '<form method="post" action="', $link->to_url(true), '">', "\n";
/** generate edit button
 * label: button label
 * text: text inserted on current cursor position into textarea with id "editarea" if button is pressed
 *       % indicates where cursor should be positioned
 * accesskey: access key of this button (e.g. Alt-KEY in Mozilla Firefox) - defaults to nothing
 */
function generate_button($label, $text, $accesskey = '')
{
    echo '<button type="button"';
    if ($accesskey != '') {
        echo ' accesskey="', $accesskey, '"';
    }
    echo ' onclick="add_to_textarea(\'editarea\', \'', htmlspecialchars($text, ENT_QUOTES), '\')">', $label, '</button>', "\n";
开发者ID:SnowyYANG,项目名称:miniwiki,代码行数:31,代码来源:editpage.php

示例14: wiki_include

function wiki_include($page, $args = null, $flat_args = false, $as_current = true)
{
    $auth =& get_auth();
    if (!$auth->is_action_permitted(get_action(MW_ACTION_VIEW), $page)) {
        return '[[' . $page->name . ']]';
    }
    $ret = '{{&push_vars}}';
    if ($as_current) {
        $ret .= '{{&set|curpage|' . $page->name . '}}';
    }
    if ($args !== null && count($args) > 0) {
        $args_str = '';
        if ($flat_args) {
            $args_str = '|' . join('|', $args);
        } else {
            foreach ($args as $name => $value) {
                $args_str .= '|' . $name . '|' . $value;
            }
        }
        $ret .= '{{&set' . $args_str . '}}';
    }
    $ret .= str_replace("\r", '', $page->get_wiki_content());
    $ret .= '{{&pop_vars}}';
    return $ret;
}
开发者ID:SnowyYANG,项目名称:miniwiki,代码行数:25,代码来源:rendering.php

示例15: asset

    <?php 
echo asset('Bits.css');
?>


    <!--[if IE]>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
	<![endif]-->

</head>
<body class="controller-<?php 
echo get_controller();
?>
 action-<?php 
echo get_action();
?>
">

<div id="auth" class="code-font">
	
	<header>
		<a href="http://coolbitsbro.com/"><span class="bit-embed"></span> Bits</a>
	</header>
	<?php 
if (isset($_GET['invalid'])) {
    ?>
<p>Invalid username or password</p><?php 
}
?>
开发者ID:juanretamales,项目名称:Bits,代码行数:29,代码来源:login.php


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