本文整理汇总了PHP中ajax::is方法的典型用法代码示例。如果您正苦于以下问题:PHP ajax::is方法的具体用法?PHP ajax::is怎么用?PHP ajax::is使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ajax
的用法示例。
在下文中一共展示了ajax::is方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Backend
public static function Backend($name, $pagename, $tablename, $action, $id)
{
if ($action == 'delete' && dyn::get('user')->hasPerm('metainfos[delete]')) {
self::delete($tablename, $id);
echo message::success(lang::get('entry_deleted'));
$action = '';
}
if (dyn::get('user')->hasPerm('metainfos[edit]')) {
if (ajax::is()) {
self::BackendAjax();
}
if ($action == 'add' || $action == 'edit' || $action == 'delete') {
self::BackendFormular($name, $tablename, $action, $id);
}
}
if ($action == '') {
self::BackendShow($name, $pagename);
}
}
示例2: mail
<?php
if (type::get('checkversion', 'int', 0) == 1) {
$cacheFile = cache::getFileName(0, 'dynaoVersion');
cache::exist($cacheFile, 0);
echo message::success(lang::get('connection_again'), true);
}
if (ajax::is()) {
if (type::super('text')) {
$mail = mail('info@dynao.de', 'Neue Idee', type::super('text'), 'From: ' . dyn::get('user')->get('firstname') . ' ' . dyn::get('user')->get('name') . '<' . dyn::get('user')->get('email') . '>');
if ($mail) {
ajax::addReturn(message::success(lang::get('idea_send')));
} else {
ajax::addReturn(message::danger(lang::get('idea_error')));
}
} else {
ajax::addReturn(message::danger(lang::get('idea_empty')));
}
}
$versionCheck = dyn::checkDynVersion();
if ($versionCheck === lang::get('version_fail_connect')) {
$message = lang::get('version_fail_connect');
$message .= '<br /><a href="' . url::backend('dashboard', ['subpage' => 'overview', 'checkversion' => 1]) . '">' . lang::get('try_again') . '</a>';
echo message::danger($message, true);
} elseif ($versionCheck) {
echo message::danger($versionCheck, true);
}
$stats = [];
$sql = sql::factory();
$numPages = $sql->num('SELECT * FROM ' . sql::table('structure'));
$sql = sql::factory();
示例3: function
$subpage = type::super('subpage', 'string');
$action = type::super('action', 'string');
$structure_id = type::super('structure_id', 'int', 0);
$id = type::super('id', 'int', 0);
// Falls was an der Page geändert worden ist
if ($page == 'structure' && $subpage == 'pages' && in_array($action, ['add', 'edit', 'seo']) && !$structure_id) {
extension::add('FORM_AFTER_SAVE', function ($form) {
seo_rewrite::generatePathlist();
return $form;
});
}
// Wenn SEO Button geklickt worden ist
if ($page == 'structure' && $subpage == 'pages' && $action == 'seo') {
seoPage::generateForm($id);
layout::addJsCode("\n\t\tvar default_url = \$('#seo-costum-url').text();\n\t\t\n\t\t\$('#seo-costum-url-text').keyup(function() {\n\t\t\tvar val = \$(this).val();\n\t\t\t\n\t\t\tif(val == '')\n\t\t\t\tval = default_url;\n\t\t\t\t\t\t\t\n\t\t\t\$('#seo-costum-url').text(val);\n\t\t});\n\t\t\n\t\tvar default_title = \$('#seo-default-title').text();\n\t\t\$('#seo-title-text').keyup(function() {\n\t\t\tvar val = \$(this).val();\n\t\t\t\n\t\t\tif(val == '')\n\t\t\t\tval = default_title;\n\t\t\t\n\t\t\t\$('#seo-title').text(val);\n\t\t});\n\t\t");
}
// Wenn Sortiert worden ist
if ($page == 'structure' && $subpage == 'pages' && (ajax::is() || $action == 'delete' && !$structure_id)) {
extension::add('BACKEND_OUTPUT', function ($output) {
seo_rewrite::generatePathlist();
return $output;
});
}
// Inhaltsseite der page
if ($page == 'structure' && $subpage == 'pages' && ($structure_id || $action == 'edit' && $id)) {
$id = $structure_id ? $structure_id : $id;
extension::add('BACKEND_OUTPUT', function ($output) use($id) {
return seoPage::generateButton($output, $id);
});
}
}
示例4: pageArea
$form = pageAreaHtml::formBlock(new pageArea(0));
echo pageAreaHtml::formOut($form);
} else {
echo pageAreaHtml::selectBlock($structure_id, $sql->num() + 1);
}
?>
</div>
</div>
</div>
</div>
<?php
//Wenn action
} else {
if (ajax::is() && dyn::get('user')->hasPerm('page[edit]')) {
$post = type::super('array');
$sort = json_decode($post, true);
pageMisc::sortStructure($sort, 0);
ajax::addReturn(message::success(lang::get('save_sorting'), true));
}
if (in_array($action, ['edit', 'add']) && dyn::get('user')->hasPerm('page[edit]')) {
$form = form::factory('structure', 'id=' . $id, 'index.php');
$field = $form->addTextField('name', $form->get('name'));
$field->fieldName(lang::get('name'));
$field->autofocus();
$template = template::factory(dyn::get('template'));
$field = $form->addElement('template', $template->getTemplates('template', $form->get('template')));
$field->fieldName(lang::get('template'));
$field = $form->addRadioField('online', $form->get('online'));
$field->fieldName(lang::get('status'));