• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP action类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: doAction

 function doAction()
 {
     $action = getaction();
     //если есть экшин- выполняем
     if (file_exists(__corePath . "actions/{$action}.php")) {
         include __corePath . "actions/{$action}.php";
         $action = new action($this->db);
         $action->execute();
     }
 }
开发者ID:openweb-tech,项目名称:hotbackup,代码行数:10,代码来源:app.php


示例2: post

/**
 * inserts a new idea in the database
 *
 * @param  string    $title  title of the idea
 * @param  string    $message message of the idea
 * @param  string    $anonymization tells if idea is to be anonymized
 * @param  integer   $category id of the category for the idea
 * @param  string    $login  login of the poster
 * @param  integer   $valid says if the idea needs to be moderated (default 0 = needs moderation)
 * @return array     
 */
function post($title, $message, $anonymization, $category, $login, $valid = 0)
{
    $action = new action();
    $action->result = False;
    $check_1 = isset($title) && !empty($title);
    $check_2 = isset($message) && !empty($message);
    $check_3 = !isset($anonymization) || $anonymization == "on";
    $check_4 = isset($category) && is_numeric($category) && $category > 0;
    // V�rification des arguments
    if ($check_1) {
        $title_prec = $title;
    } else {
        $action->add_warning(_('Titre incorrect'));
    }
    if ($check_2) {
        $text_prec = $message;
    } else {
        $action->add_warning(_('Message incorrect'));
    }
    if ($check_3) {
        if (isset($anonymization)) {
            $anon_prec = "on";
        }
    } else {
        $action->add_warning(_('Incorrect anonymization value'));
    }
    if ($check_4) {
        $cate_prec = $category;
    } else {
        $action->add_warning(_('Catégorie incorrecte'));
    }
    if ($check_1 && $check_2 && $check_3 && $check_4) {
        $title_prec_sec = mysql_real_escape_string($title_prec);
        $text_prec_sec = mysql_real_escape_string($text_prec);
        $cate_prec_sec = mysql_real_escape_string($cate_prec);
        $rand_prop = mt_rand(0, 65535);
        $hash_prop = sha1($login . $rand_prop);
        if ($anon_prec == "on") {
            $name_print = "";
        } else {
            $name_print = mysql_real_escape_string(construct_name_from_session());
        }
        if (@mysql_query("INSERT INTO `thread` (`thread_id`,`rand_prop`,`hash_prop`,`title`,`text`,`date`,`category`,`is_valid`,`possibly_name`) VALUES (NULL, '{$rand_prop}', '{$hash_prop}','{$title_prec_sec}','{$text_prec_sec}',CURRENT_TIMESTAMP,'{$cate_prec_sec}',{$valid},'{$name_print}')")) {
            $action->add_success(_('Ta proposition a bien été ajoutée et est en attente de modération'));
            $action->result = True;
        } else {
            $action->add_warning(_('Ta proposition n\'a pas pu être ajoutée suite à une erreur de transfert.'));
        }
    }
    return $action;
}
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:62,代码来源:actions.php


示例3: define

    exit;
}

define('HIDE_TOOL_TITLE', 1);
$guest_allowed = true;

require_once 'include/baseTheme.php';
require_once 'include/CAS/CAS.php';
require_once 'modules/auth/auth.inc.php';
require_once 'include/lib/textLib.inc.php';
require_once 'include/phpass/PasswordHash.php';

// unset system that records visitor only once by course for statistics
require_once 'include/action.php';
if (isset($dbname)) {
    $action = new action();
    $action->record('MODULE_ID_UNITS', 'exit');
}
unset($dbname);

// if we try to login... then authenticate user.
$warning = '';
if (isset($_SESSION['shib_uname'])) {
    // authenticate via shibboleth
    shib_cas_login('shibboleth');
} elseif (isset($_SESSION['cas_uname']) && !isset($_GET['logout'])) {
    // authenticate via cas
    shib_cas_login('cas');
} elseif (isset($_GET['provider'])) {
        //hybridauth authentication (Facebook, Twitter, Google, Yahoo, Live, LinkedIn)
        hybridauth_login();
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:index.php


示例4: action

 * ========================================================================
 */
$require_current_course = TRUE;
$require_login = TRUE;
$require_help = TRUE;
$helpTopic = 'bbb';
require_once '../../include/baseTheme.php';
require_once 'include/sendMail.inc.php';
// For creating bbb urls & params
require_once 'bbb-api.php';
require_once 'functions.php';
require_once 'include/lib/modalboxhelper.class.php';
ModalBoxHelper::loadModalBox();
/* * ** The following is added for statistics purposes ** */
require_once 'include/action.php';
$action = new action();
$action->record(MODULE_ID_BBB);
/* * *********************************** */
$toolName = $langBBB;
// guest user not allowed
if (check_guest()) {
    $tool_content .= "<div class='alert alert-danger'>{$langNoGuest}</div>";
    draw($tool_content, 2);
}
load_js('tools.js');
load_js('tagsinput');
load_js('bootstrap-datetimepicker');
load_js('validation.js');
$head_content .= "\r\n<script type='text/javascript'>\r\n\$(function() {\r\n\$('#start_session').datetimepicker({\r\n        format: 'dd-mm-yyyy hh:ii', pickerPosition: 'bottom-left', \r\n        language: '" . $language . "',\r\n        autoclose: true\r\n    });\r\n});\r\n</script>";
load_js('select2');
$head_content .= "<script type='text/javascript'>\r\n    \$(document).ready(function () {\r\n        \$('#select-groups').select2();       \r\n        \$('#selectAll').click(function(e) {\r\n            e.preventDefault();\r\n            var stringVal = [];\r\n            \$('#select-groups').find('option').each(function(){\r\n                stringVal.push(\$(this).val());\r\n            });\r\n            \$('#select-groups').val(stringVal).trigger('change');\r\n        });\r\n        \$('#removeAll').click(function(e) {\r\n            e.preventDefault();\r\n            var stringVal = [];\r\n            \$('#select-groups').val(stringVal).trigger('change');\r\n        });         \r\n    });\r\n\r\n    </script>\r\n";
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:index.php


示例5: get_footer

function get_footer()
{
    ?>
    <!-- jQuery & Required Scripts -->
    <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
    
    <?php 
    if (!IS_SINGLE && PAGINATION_ON_OFF !== "off") {
        ?>
    <!-- Post Pagination -->
    <script>
        var infinite = true;
        var next_page = 2;
        var loading = false;
        var no_more_posts = false;
        $(function() {
            function load_next_page() {
                $.ajax({
                    url: "index.php?page=" + next_page,
                    beforeSend: function () {
                        $('body').append('<article class="loading-frame"><div class="row"><div class="one-quarter meta"></div><div class="three-quarters"><img src="./templates/<?php 
        echo ACTIVE_TEMPLATE;
        ?>
/loading.gif" alt="Loading"></div></div></article>');
                        $("body").animate({ scrollTop: $("body").scrollTop() + 250 }, 1000);
                    },
                    success: function (res) {
                        next_page++;
                        var result = $.parseHTML(res);
                        var articles = $(result).filter(function() {
                            return $(this).is('article');
                        });
                        if (articles.length < 2) {  //There's always one default article, so we should check if  < 2
                            $('.loading-frame').html('You\'ve reached the end of this list.');
                            no_more_posts = true;
                        }  else {
                            $('.loading-frame').remove();
                            $('body').append(articles);
                        }
                        loading = false;
                    },
                    error: function() {
                        $('.loading-frame').html('An error occurred while loading posts.');
                        //keep loading equal to false to avoid multiple loads. An error will require a manual refresh
                    }
                });
            }

            $(window).scroll(function() {
                var when_to_load = $(window).scrollTop() * 0.32;
                if (infinite && (loading != true && !no_more_posts) && $(window).scrollTop() + when_to_load > ($(document).height()- $(window).height() ) ) {
                    // Sometimes the scroll function may be called several times until the loading is set to true.
                    // So we need to set it as soon as possible
                    loading = true;
                    setTimeout(load_next_page,500);
                }
            });
        });
    </script>
    <?php 
    }
    ?>
    
    <!-- Dropplets Tools -->
    <?php 
    include './dropplets/tools.php';
    ?>
    
    <!-- User Footer Injection -->
    <?php 
    echo FOOTER_INJECT;
    ?>
    
    <!-- Plugin Footer Injection -->
    <?php 
    action::run('dp_footer');
}
开发者ID:roblarsen,项目名称:dropplets,代码行数:77,代码来源:functions.php


示例6: form_action

 function form_action($name = '')
 {
     $this->validator =& new validator();
     parent::action($name);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:5,代码来源:form_action.class.php


示例7: action

<?php

include "../config/config.php";
include "../common/mysql.class.php";
include "action.php";
$db = new action($mydbhost, $mydbuser, $mydbpw, $mydbname, ALL_PS, $mydbcharset);
session_start();
$uid = $_SESSION['admin_uid'];
$shell = $_SESSION['admin_shell'];
$db->getUserShellCheck($uid, $shell);
$db->getUserOntime();
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin Panel</title>
<link href="css/manager.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div class="title">System Information</div>
<div align="center" class="main_body">
<div class="sysinfo">
<p>SERVER NAME:<?php 
echo $_SERVER['SERVER_NAME'];
?>
</p>
<ul>
<li>HTTP HOST:<?php 
echo $_SERVER['HTTP_HOST'];
?>
开发者ID:howareyoucolin,项目名称:demo,代码行数:31,代码来源:main.php


示例8: die

<?php

if (!defined('KIRBY')) {
    die('Direct access is not allowed');
}
if ($panel->action != 'edit-file') {
    return;
}
$action = action::editFile();
$file = data::fileByFilename();
$form = new fileform($settings, $file);
if (!$file) {
    go(showurl('files'));
}
?>
<div class="overlay edit-file">

  <form method="post">

    <?php 
growl($action);
?>

    <fieldset>
      <h3><?php 
echo l::get('files.edit.title');
?>
</h3>
      
      <div class="field">
        <label><?php 
开发者ID:codecuts,项目名称:lanningsmith-website,代码行数:31,代码来源:files.edit.php


示例9: die

<?php

if (!defined('KIRBY')) {
    die('Direct access is not allowed');
}
snippet('header');
if (!$page->isHomePage() && !$page->isErrorPage()) {
    $action = action::updateURL();
    ?>
<div class="options form">

  <form action="<?php 
    echo thisURL();
    ?>
" method="post">
    
    <fieldset>    
      <div class="field url">
        <label><?php 
    echo l::get('options.url');
    ?>
</label>
        <span class="url input"><em><?php 
    echo dirname(ourl($page->url()));
    ?>
/</em><strong><input type="url" name="uid" value="<?php 
    echo $page->uid();
    ?>
" /></strong></span>
      </div>
    </fieldset>
开发者ID:codecuts,项目名称:lanningsmith-website,代码行数:31,代码来源:preview.php


示例10: action

 */
$require_current_course = TRUE;
$require_help = TRUE;
$helpTopic = 'Agenda';
$guest_allowed = true;

require_once '../../include/baseTheme.php';
require_once 'include/action.php';
require_once 'include/log.php';
require_once 'include/lib/modalboxhelper.class.php';
require_once 'include/lib/multimediahelper.class.php';
require_once 'modules/search/agendaindexer.class.php';
require_once 'modules/agenda/course_calendar.inc.php';
ModalBoxHelper::loadModalBox();

$action = new action();
$action->record(MODULE_ID_AGENDA);
// define different views of agenda
define('EVENT_LIST_VIEW', 1);
define('EVENT_CALENDAR_VIEW', 0);

$dateNow = date("j-n-Y / H:i", time());

$toolName = $langAgenda;

if (isset($_GET['v'])) {
    $v = intval($_GET['v']); // get agenda view    
    if ($v == 1) {
        $view = EVENT_LIST_VIEW; // list view
    } else {
        $view = EVENT_CALENDAR_VIEW; // calendar view
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:index.php


示例11: display

 function display($searchResult)
 {
     if ($searchResult) {
         echo "<div id='result' class='search'>";
         echo "<b>Suchergebnis - </b>";
         echo " <i class='normal'>" . count($searchResult) . " Treffer</i>";
         echo form::link("delete", "x", "index.php?action=hidesearch", "close-search");
         action::listit("search", $searchResult);
         foreach ($searchResult as $entry) {
             $nameArray = thesaurus::get_descriptor($entry[ID]);
             export::descriptor($nameArray[ID], session::get("search"), "SHOW");
             echo "<hr>";
         }
         // set parent
         if (session::get(show) != 0) {
             $parent = session::get(show);
         } else {
             $parent = system::getval("val_orderdefault");
         }
         // sugest new entry if orderdefault is set or OB is displayed
         if ($parent) {
             form::insert_entry(array('parent' => $parent, 'action' => 'add', ""), array(), session::get(search));
         } else {
             echo "<p>Kein Oberbegriff für neuen Begriff gesetzt.</p>";
         }
         echo "</div>";
     } else {
         echo "<div id='result' class='search'>";
         echo "<span class='red'>Kein Eintrag gefunden</span>";
         echo form::link("delete", "x", "index.php?action=hidesearch", "close-search");
         // set parent
         if (session::get(show) != 0) {
             $parent = session::get(show);
         } else {
             $parent = system::getval("val_orderdefault");
         }
         // sugest new entry if orderdefault is set or OB is displayed
         if ($parent) {
             form::insert_entry(array('parent' => $parent, 'action' => 'add', ""), array(), session::get(search));
         } else {
             echo "<p>Kein Oberbegriff für neuen Begriff gesetzt.</p>";
         }
         echo "</div>";
     }
 }
开发者ID:nibble-arts,项目名称:openthesaurus,代码行数:45,代码来源:search.php


示例12: form_action

 function form_action()
 {
     $this->validator =& new validator();
     parent::action();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:5,代码来源:form_action.class.php


示例13: recover_version_action

 function recover_version_action()
 {
     parent::action();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:4,代码来源:recover_version_action.class.php


示例14: define

define('HIDE_TOOL_TITLE', 1);
$require_current_course = true;
$guest_allowed = true;
$require_help = TRUE;
$helpTopic = 'AddCourseUnitscontent';

require_once '../../include/baseTheme.php';
require_once 'include/lib/fileDisplayLib.inc.php';
require_once 'include/action.php';
require_once 'functions.php';
require_once 'modules/document/doc_init.php';
require_once 'modules/tags/moduleElement.class.php';
require_once 'include/lib/modalboxhelper.class.php';
require_once 'include/lib/multimediahelper.class.php';

$action = new action();
$action->record(MODULE_ID_UNITS);

if (isset($_REQUEST['id'])) {
    $id = intval($_REQUEST['id']);
}
if (isset($_GET['cnt'])) {
    $cnt = intval($_REQUEST['cnt']);
}

$pageName = '';
$lang_editor = $language;
load_js('tools.js');
ModalBoxHelper::loadModalBox(true);

if (isset($_REQUEST['edit_submitW'])) { //update title and comments for week
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:index.php


示例15: display

    }
    function display()
    {
        if ($this->jump == true) {
            $say = '<p>
                <strong>The ball was delivered ' . $this->arm . ' handed by ' . $this->name . ' with great skill!</strong>
            </p>';
        } else {
            if ($this->jump == false) {
                $say = '<p>
                <strong>The ball was delivered ' . $this->arm . ' handed by ' . $this->name . ' with little skill!</strong>
            </p>';
            }
        }
        return $say . '
            <p>
                Skill One ' . $this->speed . ' / ' . $this->skill1 . '
            </p>
            <p>
                Skill Two ' . $this->jump . ' / ' . $this->skill2 . '
            </p>';
    }
}
#############################
#############################
##USAGE Example
#############################
#############################
$bowler = new action();
$bowler->set('Steven Finn', 'r', rand(0, 100), rand(0, 100));
echo $bowler->display();
开发者ID:russellbarnard,项目名称:Random-Files,代码行数:31,代码来源:bowling-action.php


示例16: q

// locate course id
$course_id = null;
$res1 = Database::get()->querySingle("SELECT course.id FROM course WHERE course.code = ?s", q($_GET['course']));
if ($res1) {
    $course_id = intval($res1->id);
}

if ($course_id == null) {
    header("Location: ${urlServer}");
    exit();
}

if ($uid) {
    require_once 'include/action.php';
    $action = new action();
    $action->record(MODULE_ID_VIDEO);
}

// ----------------------
// download video
// ----------------------
$res2 = Database::get()->querySingle("SELECT * FROM video
                  WHERE course_id = ?d AND id = ?d", $course_id, $_GET['id']);

if (!$res2) {
    header("Location: ${urlServer}");
    exit();
}

$valid = ($uid || course_status($course_id) == COURSE_OPEN) ? true : token_validate($row2['path'], $_GET['token'], 30);
开发者ID:nikosv,项目名称:openeclass,代码行数:30,代码来源:file.php


示例17: logout_action

 function logout_action($name = '')
 {
     parent::action($name);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:4,代码来源:logout_action.class.php


示例18: display_template_source_action

	function display_template_source_action($name='')
	{
		parent :: action($name);
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:4,代码来源:display_template_source_action.class.php


示例19: die

<?php

if (!defined('KIRBY')) {
    die('Direct access is not allowed');
}
?>

<?php 
snippet('header');
?>

<?php 
if (!$panel->nocontent) {
    action::updateContent();
    ?>

<div class="form">		
  
  <form action="<?php 
    echo showurl('content');
    ?>
" method="post">
    
    <?php 
    echo $panel->form->load();
    ?>
		

    <fieldset class="bottom">
      <div class="buttons">
        <input type="submit" name="update-content" value="<?php 
开发者ID:codecuts,项目名称:lanningsmith-website,代码行数:31,代码来源:content.php


示例20: get_includes

function get_includes($location)
{
    extract($GLOBALS);
    // Default includes for the footer.
    if ($location == 'footer') {
        ?>
    <script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $(document).on('click', '#pagination a',function(e) {
                e.preventDefault();
                var page_url=$(this).prop('href');
                
                $('#gallery').append('<div id="loading" class="animated flash"></div>');
                $('#gallery').load(page_url + ' #gallery');
                $('html, body').animate({
                    scrollTop: $("#gallery").offset().top
                }, 400);
                
            });
        });
    </script>
    <?php 
    }
    // For addons.
    action::run($location);
}
开发者ID:cristianoiglesias,项目名称:cinematico,代码行数:27,代码来源:functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP action_menu类代码示例发布时间:2022-05-23
下一篇:
PHP acf_field类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap