本文整理汇总了PHP中create_form_token函数的典型用法代码示例。如果您正苦于以下问题:PHP create_form_token函数的具体用法?PHP create_form_token怎么用?PHP create_form_token使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_form_token函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_form_token
echo $site->CONF['wwwroot'] . $site->CONF[styles_path];
?>
/scms_general.css">
<SCRIPT LANGUAGE="JavaScript" SRC="<?php
echo $site->CONF['wwwroot'] . $site->CONF[js_path];
?>
/yld.js"></SCRIPT>
</head>
<body class="popup_body" onLoad="this.focus();document.forms['vorm'].name.focus();">
<FORM action="<?php
echo $site->self;
?>
" method="post" name="vorm">
<?php
create_form_token('edit-forms');
?>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; height:100%">
<tr>
<td valign="top" width="100%" class="scms_dialog_area_top" height="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<?php
############ name #########
if ($form_error['name']) {
$name = $site->fdat['name'];
} else {
$name = $form_def['name'];
}
?>
<tr>
示例2: edit_objekt_metadata
/**
* edit_object_metadata.php
*
* used by SEO Module to modify sections title, meta-description and meta-keywords
*
*/
function edit_objekt_metadata()
{
global $site;
$objekt = new Objekt(array('objekt_id' => $site->fdat['id'], 'no_cache' => '1'));
?>
<form name="frmEdit" action="<?php
echo $site->self;
?>
" method="POST">
<?php
create_form_token('edit-object-seo');
?>
<input type=hidden name=tab value="<?php
echo $site->fdat['tab'];
?>
">
<input type=hidden name=id value="<?php
echo $site->fdat['id'];
?>
">
<input type=hidden name=op value="<?php
echo $site->fdat['op'];
?>
">
<input type=hidden name=op2 value="">
<tr>
<td valign="top" width="100%" class="scms_dialog_area" height="100%">
<div class="scms_scrolltable_border">
<div style="width:100%;" class="scms_scrolltable_header">
<table width="100%" cellpadding="0" cellspacing="0">
</table>
</div>
<div id="scrolltableDiv" class="scms_scrolltable" style="height:290px">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<?php
//peaks siis otsima millisel esivanemal on SEO meta't
function getSeoData($id, $clear = false)
{
static $seo_meta = array();
$objekt = new Objekt(array('objekt_id' => $id));
if ($clear) {
$seo_meta = array();
}
if ($objekt->all['meta_title'] && empty($seo_meta['meta_title'])) {
$seo_meta['meta_title'] = $objekt->all['meta_title'];
}
if ($objekt->all['meta_keywords'] && empty($seo_meta['meta_keywords'])) {
$seo_meta['meta_keywords'] = $objekt->all['meta_keywords'];
}
if ($objekt->all['meta_description'] && empty($seo_meta['meta_description'])) {
$seo_meta['meta_description'] = $objekt->all['meta_description'];
}
//if we have all seo data or the the tree trunk (id=0) then end else recurse
if ($seo_meta['meta_title'] && $seo_meta['meta_keywords'] && $seo_meta['meta_description'] || $id == 0) {
return $seo_meta;
} else {
return getSeoData($objekt->all['parent_id']);
}
}
if ($objekt->all['objekt_id']) {
$seo_meta = getSeoData($objekt->all['objekt_id']);
$higher_seo_meta = getSeoData($objekt->all['parent_id'], true);
} else {
$seo_meta = getSeoData($site->fdat['parent_id']);
$higher_seo_meta = $seo_meta;
}
?>
<script type="text/javascript">
var metas = new Array();
metas['meta_title'] = '<?php
echo str_replace(array("\r", "\n"), ' ', addslashes($higher_seo_meta['meta_title']));
?>
';
metas['meta_keywords'] = '<?php
echo str_replace(array("\r", "\n"), ' ', addslashes($higher_seo_meta['meta_keywords']));
?>
';
metas['meta_description'] = '<?php
echo str_replace(array("\r", "\n"), ' ', addslashes($higher_seo_meta['meta_description']));
?>
';
function toggle(id)
{
var switcher=document.getElementById(id);
if(switcher)
{
if(switcher.disabled) switcher.disabled=false;
else
{
switcher.disabled=true;
//.........这里部分代码省略.........
示例3: create_form_token
?>
<tr>
<td width="100%" valign="top" class="scms_pane_area" height="100%">
<?php
################
# DATA TABLE
?>
<div id=listing class="scms_middle_div" style="min-height: 440px">
<table width="100%" border="0" cellspacing="10" cellpadding="0" style="height:100%;">
<form action="<?php
echo $site->self;
?>
" name="dataform" method=post>
<?php
create_form_token('change-config');
?>
<?php
#################
# DATA ROWS
?>
<tr>
<td height="100%" valign="top">
<table class="scms_table" width="100%" border="0" cellspacing="0" cellpadding="4" id="contenttable">
<?php
print_config_table();
?>
<tr><td></td></tr>
示例4: create_form_token
}
######################
# UNSET parent group info for new group
if ($site->fdat['op'] == 'new') {
$group = '';
}
?>
<tr>
<td valign="top" width="100%" class="scms_dialog_area" height="100%">
<table width="100%" border="0" cellspacing="3" cellpadding="0" class="scms_borderbox">
<form name="frmEdit" action="<?php
echo $site->self;
?>
" method="POST">
<?php
create_form_token('edit-group');
?>
<input type=hidden name=tab value="<?php
echo $site->fdat['tab'];
?>
">
<input type=hidden name=group_id value="<?php
echo $site->fdat['group_id'];
?>
">
<input type=hidden name=op value="<?php
echo $site->fdat['op'];
?>
">
<input type=hidden name=op2 value="">
<input type=hidden id=refresh name=refresh value="">
示例5: create_form_token
</div><!-- / scms_header_bar -->
<?php
}
?>
<div id="scms_content_body">
<div id="edit_translastion_container">
<form id="translations_form" action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method="POST">
<?php
create_form_token('edit-translations');
?>
<input type="hidden" name="op" value="<?php
echo $site->fdat['op'] == 'edit' ? 'edit' : 'new';
?>
" />
<input type="hidden" name="action" value="save" />
<input type="hidden" name="action" value="save" />
<?php
if ($site->fdat['type'] == 'popup') {
?>
<input type="hidden" name="type" value="popup" /><?php
}
?>
示例6: create_form_token
<li><a href="javascript:document.getElementById('configs_form').submit();" class="button_save"><?php
echo $site->sys_sona(array('sona' => 'salvesta', 'tyyp' => 'Editor'));
?>
</a></li>
</ul>
</td>
</tr>
</table>
</div><!-- / toolbarArea -->
<div class="contentAreaContent withTitleAndToolBar">
<form name="configs_form" id="configs_form" method="POST" action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<?php
create_form_token('image-configs');
?>
<input type="hidden" name="save_configs" value="1">
<table cellpadding="0" cellspacing="0" class="data_table">
<tr>
<td><input type="text" name="image_width" class="text_config" value="<?php
echo $configs['image_width']['sisu'];
?>
"></td>
<td><?php
echo $configs['image_width']['kirjeldus'];
?>
</td>
</tr>
<tr>
<td><input type="text" name="thumb_width" class="text_config" value="<?php
示例7: create_form_token
<script type="text/javascript">
window.opener.location=mylocation;
window.close();
</script>
<?php
exit;
################################
# Ask confirmation
} else {
?>
<form action="<?php
echo $site->self;
?>
" method=get>
<?php
create_form_token('delete-object');
?>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; height:100px">
<tr>
<td valign="top" width="100%" class="scms_confirm_delete_cell" height="100%">
<?php
######## 1. ask confirmation: "Do you want to delete this and that?"
$kinnitus = $site->sys_sona(array(sona => "tyyp_" . $tyyp['nimi'], tyyp => "System")) . ' "<b>' . $objekt->pealkiri . '</b>": ' . $site->sys_sona(array(sona => "Kas tahate kustutada", tyyp => "editor"));
echo $kinnitus;
######## 2. for section only, show alert: "NB! This section includes objects which are published also in other sections. These objects are deleted only from this section."
# If we have tyyp=rubriik, check for objects, that are under some other rubrics too
if ($objekt->all['klass'] == "rubriik") {
$sql = $site->db->prepare("SELECT DISTINCT objekt.objekt_id, objekt.pealkiri FROM objekt \r\n\t\t\tLEFT JOIN objekt_objekt AS parents_objekt ON parents_objekt.parent_id = ? \r\n\t\t\tLEFT JOIN objekt_objekt AS alam_objekt ON alam_objekt.objekt_id=parents_objekt.objekt_id \r\n\t\t\tWHERE objekt.tyyp_id = 2 AND objekt.objekt_id = alam_objekt.objekt_id AND alam_objekt.parent_id != ?", $objekt->objekt_id, $objekt->objekt_id);
$sth = new SQL($sql);
$site->debug->msg($sth->debug->get_msgs());
if ($sth->rows) {
示例8: edit_permissions
//.........这里部分代码省略.........
foreach ($selected_users as $user_id) {
# if user not found in existing users (in database) then add it
if (!in_array($user_id, $existing_users)) {
# get user info: to get user full name
$user = new User(array(user_id => $user_id));
$permtmp = array();
$permtmp['type'] = $args['type'];
$permtmp['source_id'] = $site->fdat['id'];
$permtmp['user_id'] = $user_id;
$permtmp['is_group'] = 0;
$permtmp['name'] = $user->all['firstname'] . ' ' . $user->all['lastname'];
# insert permission to the permissions array:
$db_permissions[] = $permtmp;
}
# if user not found in existing users
}
# foreach user id
}
# if selected_users
# / TEMPORALLY SELECTED USERS & GROUPS PERMISSIONS
######################
#printr($db_permissions);
?>
<tr>
<td valign="top" width="100%" class="scms_dialog_area" height="100%">
<div class="scms_scrolltable_border">
<div style="width:100%;" class="scms_scrolltable_header">
<table width="100%" cellpadding="0" cellspacing="0">
<form name="frmEdit" action="<?php
echo $site->self;
?>
" method="POST">
<?php
create_form_token('edit-permissions');
?>
<input type=hidden name=tab value="<?php
echo $site->fdat['tab'];
?>
">
<input type=hidden name=id value="<?php
echo $site->fdat['id'];
?>
">
<input type=hidden name=keel value="<?php
echo $site->fdat['keel'];
?>
">
<input type=hidden name=op value="<?php
echo $site->fdat['op'];
?>
">
<input type=hidden name="callback" value="<?php
echo $site->fdat['callback'];
?>
">
<input type=hidden name=op2 value="">
<input type=hidden name=selected_users value="<?php
echo join(',', $selected_users);
?>
">
<input type=hidden name=selected_groups value="<?php
echo join(',', $selected_groups);
?>
">
<tr>
示例9: create_form_token
<tr>
<td valign="top" width="100%" class="scms_dialog_area" height="100%">
<table width="100%" height=100% border="0" cellspacing="3" cellpadding="0" class="scms_borderbox">
<form name="frmEdit" action="<?php
echo $site->self;
?>
" method="POST">
<?php
create_form_token('edit-user-mailinglist');
?>
<input type=hidden name=tab value="<?php
echo $site->fdat['tab'];
?>
">
<input type=hidden name=user_id value="<?php
echo $site->fdat['user_id'];
?>
">
<input type=hidden name=group_id value="<?php
echo $site->fdat['group_id'];
?>
">
<input type=hidden name=op value="<?php
echo $site->fdat['op'];
示例10: change_profile_map_value1
if ($profile_def['source_table'] == 'obj_asset') {
?>
change_profile_map_value1(document.forms['vorm'].profile_type.options[document.forms['vorm'].profile_type.options.selectedIndex].value);<?php
} else {
?>
change_profile_map_value2(document.forms['vorm'].definition_name.value);<?php
}
?>
">
<FORM action="<?php
echo $site->self;
?>
" method="post" name="vorm">
<?php
create_form_token('edit-profile-field');
###################
# luba profiili MUUTA ja nime muuta ainult siis kui andmeid SELLE KONKREETSE V�LJA KOHTA pole veel sisestatud:
# otsi, kas leidub selle profiiliga andmeid kus antud v�li ei ole t�hi (aga ignoreeri default pealkirja v�lja, sest see asub objekt tabelis Bug #2818)
$locked = 0;
if ($site->fdat['op'] == "edit" && $site->fdat['did'] && !$profile_info["is_general"] && $site->fdat['did'] != 'pealkiri') {
$sql2 = "SELECT COUNT(*) FROM " . $profile_def['source_table'] . " WHERE profile_id = ? AND ";
$sql2 .= " " . $site->fdat['did'] . " <>''";
#print $sql2;
$sql2 = $site->db->prepare($sql2, $site->fdat['pid']);
$sth2 = new SQL($sql2);
$site->debug->msg($sth2->debug->get_msgs());
$found_data = $sth2->fetchsingle();
$locked = $found_data ? 1 : 0;
}
# testimiseks: $locked = 0;
示例11: SQL
## LOAD DATA
$sql = "SELECT * FROM css";
$sth = new SQL($sql);
while ($tmp = $sth->fetch()) {
$css[$tmp['name']] = $tmp;
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<form action="<?php
echo $site->self;
?>
" name="dataform" method="POST">
<?php
create_form_token('edit-styles');
?>
<input type="hidden" name="save" value="1">
<?php
##############
# FUNCTION BAR
?>
<!-- Toolbar -->
<tr>
<td class="scms_toolbar">
<TABLE cellpadding=0 cellspacing=0 border=0>
<TR>
<?php
############ save button ###########
?>
示例12: create_form_token
<link rel="stylesheet" href="<?php
echo $site->CONF['wwwroot'] . $site->CONF['styles_path'];
?>
/scms_general.css">
<SCRIPT LANGUAGE="JavaScript" SRC="<?php
echo $site->CONF['wwwroot'] . $site->CONF['js_path'];
?>
/yld.js"></SCRIPT>
</head>
<body class="popup_body">
<form name="frmEdit" action ="<?php
echo $site->self;
?>
" method="POST">
<?php
create_form_token('delete-data');
?>
<input type=hidden name=table_name value="<?php
echo $site->fdat['table_name'];
?>
">
<input type=hidden name=field_name value="<?php
echo $site->fdat['field_name'];
?>
">
<input type=hidden name=op value="<?php
echo $site->fdat['op'];
?>
">
<input type=hidden name=op2 value="">
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; height:100%">
示例13: edit_objekt
//.........这里部分代码省略.........
form.op2.value = op2;
form.submit();
}
});
}
else
{
form.op2.value = op2;
form.submit();
}
}
</script>
<?php
if ($editor->browser() == 'Gecko') {
?>
<style type="text/css">
table.layout td.editor div {
height: 100%;
}
</style>
<?php
}
?>
</head>
<body id="scms_editor_popup">
<form action="edit.php" method="POST" name="frmEdit" id="frmEdit" class="article_submit_form">
<?php
create_form_token('edit-article');
?>
<input type=hidden name="op" value="<?php
echo $site->fdat['op'];
?>
">
<input type=hidden name="op2" id="op2" value="saveclose">
<input type=hidden name="refresh" value="0">
<input type="hidden" name="tyyp_id" value="<?php
echo $tyyp['tyyp_id'];
?>
">
<input type="hidden" name="tyyp" value="<?php
echo $tyyp['klass'];
?>
">
<input type="hidden" name="sys_alias" value="<?php
echo $site->fdat['sys_alias'];
?>
">
<input type="hidden" name="id" value="<?php
echo $site->fdat['id'];
?>
">
<input type="hidden" name="kesk" value="<?php
echo $site->fdat['kesk'];
?>
">
<input type="hidden" name="parent_id" value="<?php
echo $site->fdat['parent_id'];
示例14: create_form_token
echo $site->CONF['wwwroot'] . $site->CONF['styles_path'];
?>
/scms_general.css">
<SCRIPT LANGUAGE="JavaScript" SRC="<?php
echo $site->CONF['wwwroot'] . $site->CONF['js_path'];
?>
/yld.js"></SCRIPT>
</head>
<body class="popup_body" onLoad="this.focus()">
<form name="editform" action="<?php
echo $site->self;
?>
" method=get>
<?php
create_form_token('delete-comments');
?>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; height:100%">
<tr>
<td valign="top" width="100%" class="scms_confirm_delete_cell" height="100%">
<?php
$objekt->load_sisu();
echo $site->sys_sona(array(sona => "kustuta", tyyp => "editor")) . " \"<b>" . substr($objekt->all['text'], 0, 20) . (strlen($objekt->all['text']) > 20 ? '...' : '') . "</b>\"? ";
echo $site->sys_sona(array(sona => "are you sure?", tyyp => "admin"));
?>
</td>
</tr>
<tr align="right">
<td valign="top" colspan=2 >
<input type="button" value="<?php
echo $site->sys_sona(array(sona => "kustuta", tyyp => "editor"));
示例15: edit_objekt
//.........这里部分代码省略.........
/jquery.js"></script>
<script type="text/javascript" src="<?php
echo $site->CONF['wwwroot'] . $site->CONF['js_path'];
?>
/datepicker.js"></script>
<script type="text/javascript" src="<?php
echo $site->CONF['wwwroot'];
?>
/common.js.php"></script>
<?php
if ($site->CONF['fm_allow_multiple_upload'] && $parent->all['ttyyp_id'] != 39) {
?>
<script type="text/javascript" src="<?php
echo $site->CONF['wwwroot'] . $site->CONF['js_path'];
?>
/swfupload/swfupload.js"></script>
<script type="text/javascript" src="<?php
echo $site->CONF['wwwroot'] . $site->CONF['js_path'];
?>
/swfupload/swfupload.queue.js"></script>
<?php
}
?>
<script type="text/javascript">
var isIE = navigator.appVersion.match(/MSIE/); // assume gecko on false
var folder_path = '<?php
echo $album_folder_path;
?>
';
var ajax_token = <?php
echo create_form_token_json('edit-album-ajax');
?>
;
var swfu;
window.onload = function ()
{
var title = document.getElementById('pealkiri');
var advanced_panel_state = document.getElementById('advanced_panel_state');
if(advanced_panel_state.value == 1)
{
togglePanel('advanced');
}
this.focus();
title.focus();
resizeWindow();
<?php
if ($site->CONF['fm_allow_multiple_upload'] && $parent->all['ttyyp_id'] != 39) {
?>
var post_params = {'<?php
echo session_name();
?>
' : '<?php
echo session_id();
?>
', 'op': 'add_image_to_album'};
$.extend(post_params, ajax_token);