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


PHP WebApp::action方法代码示例

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


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

示例1: array

                }
            }
            $menu .= '      </ul>' . PHP_EOL;
            print $menu;
            $child_items->free_result();
        }
    }
}
print '      <ul class="nav nav-sidebar">' . PHP_EOL;
print '        <li><a class="text-muted" href="#" onclick="$(\'#logout_users\').modal(\'show\')">Log Out&nbsp;&nbsp;&nbsp;<span class="' . B_ICON . ' 
' . B_ICON . '-log-out"></span></a></li>' . PHP_EOL;
print '      </ul>' . PHP_EOL;
?>
    </div>
<?php 
$logout_conf = $page->getPlugin('modalconf', array('logout', 'user', WebApp::action('user', 'logout', false), 'post'));
$logout_conf->addDefaultConfig();
$logout_conf->setDefaultModal()->setContent('<p>Are you sure you want to logout?</p>')->setDefaultModal()->setTitle('Logout?')->setRightBtn('primary', 'Logout', 'log-out', 'button', 'document.location=\'/action/user/logout\'')->build();
print $logout_conf->getModal();
?>
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
      <div class="row">
        <div class="col-xs-12">
          <div id="alert_working" class="hidden">
<?php 
$working = $page->getPlugin('alert');
$working->setAlert('Processing...', B_T_INFO, 'working', false);
print $working->getAlert();
?>
          </div>
        <div id="status_bar"></div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:nav.php

示例2: array

<div class="row pane">
  <div class="col-xs-12">
    <h1 class="page-header">Email</h1>
<?php 
$checkBtn = array('s' => B_T_INFO, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'checkNames(this)'), 'ic' => 'user');
$sendBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'email\', this, \'send\', \'updateEditor\')'), 'ic' => 'send');
$form = $page->getPlugin('form', array('email', WebApp::action('email', 'send', true), 'post'));
$form->setIndent('    ')->setColumns(2, 8, 2)->addSelect2('To', 'to', '', array('t' => 'Contacts to send email to. * denotes group'), array('r' => true))->addTextField('Subject', 'subject', '', array('t' => 'The subject of the email', 'p' => 'Subject'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A subject is required.', 's' => B_T_FAIL)), 'vo' => 'validateOn:["blur"]', 'r' => true))->addTextArea('Message', 'message', '<p>' . $page->parent->user->getFullName() . '</p>', 10, array('t' => 'The email message'), array('ck' => true, 'ckt' => 'Basic'))->addBtnLine(array('Check Addresses' => $checkBtn, 'Send Email' => $sendBtn));
$form->build();
print $form->getForm();
?>
  </div>
</div>
<script type="text/javascript">
$('[name="to"]').select2({
	multiple: true,
	placeholder: "Search for contacts",
	minimumInputLength: 1,
	ajax: {
		url: "/ajax/email/contacts",
		dataType: 'json',
		data: function(term, page){
			return {
				q: term
			}
		},
		results: function (data, page){
			return {results: data.data.contacts}
		}
	}
});
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:email.php

示例3: array

        $option_query->store_result();
        if ($option_query->num_rows == 1) {
            $option_query->fetch();
        } else {
            $page->setStatus(404);
            return;
        }
    } else {
        $page->setStatus(404);
        return;
    }
} else {
    $page->setStatus(404);
    return;
}
$closeBtn = array('a' => array('t' => 'url', 'a' => '../ipblock_view'), 'ic' => 'remove-sign');
$saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'ipblock_edit\', this, \'save\')'), 'ic' => 'floppy-disk');
$applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'ipblock_edit\', this, \'apply\')'), 'ic' => 'ok-sign');
$form = $page->getPlugin('form', array('ipblock_edit', WebApp::action('core', 'ipblock_edit', true), 'post'));
$form->setColumns(2, 6)->setIndent('    ')->addTextField('Block ID', 'id', $block_id, array(), array('ro' => true))->addTextField('Block Created', 'time', date(DATET_LONG, strtotime($time)), array('t' => 'Time the block was created'), array('ro' => true))->addTextField('User', 'user', $user, array('t' => 'User that created the block.'), array('ro' => true))->addTextField('IP Address', 'ip', $ip, array('t' => 'IP Address to block.', 'p' => 'xyz.xyz.xyz.xyz'), array('ro' => true))->addTextField('Length', 'length', $length, array('t' => 'Length of block in days.', 'p' => 'Days to block'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'Length of block is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]', 'd' => false, 'r' => true, 'vt' => 'integer', 't' => 'number'))->addTextField('Reason', 'reason', $reason, array('t' => 'Reason for block.', 'p' => 'Reason'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Reason is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A Reason is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Reason is limited to 255 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 255, validateOn:["blur"]', 'r' => true))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn));
$form->build();
?>

<div class="row pane">
  <div class="col-xs-12">
    <h1 class="page-header">Edit Block</h1>
    <?php 
print $form->getForm();
?>
  </div>
</div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:ipblock_edit.php

示例4: array

<?php

$config = $this->parent->parent->config->config;
$closeBtn = array('a' => array('t' => 'url', 'a' => 'config_view'), 'ic' => 'remove-sign');
$saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'config_edit\', this, \'save\', \'checkSave\')'), 'ic' => 'floppy-disk');
$applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'config_edit\', this, \'apply\', \'checkSave\')'), 'ic' => 'ok-sign');
$form = $page->getPlugin('form', array('config_edit', WebApp::action('core', 'config_edit', true), 'post', 'application/x-www-form-urlencoded', 'checkSave'));
$checkSave = 'function checkSave(){' . PHP_EOL;
$checkSave .= '  var conf = confirm("Are you sure you wish to save the configuration?\\nThis may break the website!");' . PHP_EOL;
$checkSave .= '  if(conf){' . PHP_EOL;
$checkSave .= '    return true;' . PHP_EOL;
$checkSave .= '  }else{' . PHP_EOL;
$checkSave .= '    return false;' . PHP_EOL;
$checkSave .= '  }' . PHP_EOL;
$checkSave .= '}' . PHP_EOL;
$form->setColumns(3, 5)->setIndent('    ')->addScript($checkSave)->addHTML('<h3>Core Settings</h3>', false)->addButtonGroup('Display Errors', 'core_errors', array(array('i' => 'errorsY', 's' => B_T_FAIL, 'v' => 1, 'l' => 'Yes&nbsp;&nbsp;&nbsp;<span class="' . B_ICON . ' ' . B_ICON . '-warning-sign"></span>', 'c' => $config['core']['errors']), array('i' => 'errorsN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['errors']))), array('t' => 'Display PHP errors on pages?'))->addButtonGroup('Maintenance', 'core_maintenance', array(array('i' => 'maintenanceY', 's' => B_T_FAIL, 'v' => 1, 'l' => 'Yes&nbsp;&nbsp;&nbsp;<span class="' . B_ICON . ' ' . B_ICON . '-warning-sign"></span>', 'c' => $config['core']['maintenance']), array('i' => 'maintenanceN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['maintenance']))), array('t' => 'If you enable maintenance mode, only Administrators and above will be able to log in. No pages will be publicly acessible (useful for updating modules)'))->addButtonGroup('Debug Log', 'core_debug', array(array('i' => 'debugY', 's' => B_T_WARNING, 'v' => 1, 'l' => 'Yes', 'c' => $config['core']['debug']), array('i' => 'debugN', 's' => B_T_SUCCESS, 'v' => 0, 'l' => 'No *', 'c' => not($config['core']['debug']))), array('t' => 'Enabling debug mode prints a log of events at the bottom of the page/as part of the JSON array to aid the debugging of features.'))->addButtonGroup('HTTPS Available', 'core_https_a', array(array('i' => 'httpsaY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes *', 'c' => $config['core']['https']['a']), array('i' => 'httpsaN', 's' => B_T_WARNING, 'v' => 0, 'l' => 'No', 'c' => not($config['core']['https']['a']))), array('t' => 'Lets the site know whether it can use HTTPS for sensitive information exchange.'))->addButtonGroup('HTTPS Force', 'core_https_f', array(array('i' => 'httpsfY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes *', 'c' => $config['core']['https']['f']), array('i' => 'httpsyN', 's' => B_T_WARNING, 'v' => 0, 'l' => 'No', 'c' => not($config['core']['https']['f']))), array('t' => 'If HTTPS is available, then it is recommended to force HTTPS on for the entire site, however, you can disable this if required.'))->addTextField('CDN Server', 'core_cdn', $config['core']['cdn'], array('t' => 'Use / to disable the CDN server, or enter the address for server (including the http(s)://)', 'p' => 'Default: /'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A CDN Server is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addHTML('<h3>Database Settings</h3>', false)->addTextField('Database', 'mysql_db', $config['mysql']['db'], array('t' => 'The database the site uses, advisable not to change this!', 'p' => 'Default: bwsc'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A database name is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addHTML('<h4>Read Server</h4>', false)->addTextField('User', 'mysql_r_user', $config['mysql']['r']['user'], array('t' => 'The user with read access to the database', 'p' => 'Default: bwsc'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A user is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addPasswordField('Password', 'mysql_r_pass', $config['mysql']['r']['pass'], array('t' => 'The password for user with read access to the database. Leave blank to not change', 'p' => 'Default: '))->addTextField('Host', 'mysql_r_host', $config['mysql']['r']['serv'], array('t' => 'The server hosting the database (can be IP or name, as long as the name resolves)', 'p' => 'Default: localhost'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A host is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addTextField('Port', 'mysql_r_port', $config['mysql']['r']['port'], array('t' => 'The port number the host listens on', 'p' => 'Default: 3306'), array('r' => true, 'v' => true, 'vt' => 'integer', 'vm' => array('textfieldInvalidFormatMsg' => array('m' => 'Port must be an integer', 's' => 'danger'), 'textfieldRequiredMsg' => array('m' => 'A port is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addHTML('<h4>Write Server</h4>', false)->addTextField('User', 'mysql_w_user', $config['mysql']['w']['user'], array('t' => 'The user with full access to the database', 'p' => 'Default: bwsc'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A user is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addPasswordField('Password', 'mysql_w_pass', $config['mysql']['w']['pass'], array('t' => 'The password for user with full access to the database. Leave blank not to change', 'p' => 'Default: '))->addTextField('Host', 'mysql_w_host', $config['mysql']['w']['serv'], array('t' => 'The server hosting the database (can be IP or name, as long as the name resolves)', 'p' => 'Default: localhost'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A host is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addTextField('Port', 'mysql_w_port', $config['mysql']['w']['port'], array('t' => 'The port number the host listens on', 'p' => 'Default: 3306'), array('r' => true, 'v' => true, 'vt' => 'integer', 'vm' => array('textfieldInvalidFormatMsg' => array('m' => 'Port must be an integer', 's' => 'danger'), 'textfieldRequiredMsg' => array('m' => 'A port is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]'))->addHTML('<h3>reCAPTCHA Settings</h3>', false)->addTextField('Public Key', 'reCAPTCHA_pub', $config['reCAPTCHA']['pub'], array('t' => 'The public key used for the reCAPTCHA service.'))->addTextField('Private Key', 'reCAPTCHA_priv', $config['reCAPTCHA']['priv'], array('t' => 'The private key used for the reCAPTCHA service.'))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn))->build();
?>
<div class="row pane">
  <div class="col-xs-12">
    <h1 class="page-header">System Configuration</h1>
    <?php 
print $form->getForm();
?>
  </div>
</div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:25,代码来源:config_edit.php

示例5: if

  <div class="col-xs-12">
    <h1 class="page-header">Install Module</h1>
    <p>Select which method you are going to use to install the module, then either browse for the zip file, or enter the path where the module is stored.</p>
<?php 
$script = '$("input[name=method]", "#install").change(function(){' . PHP_EOL;
$script .= '  if($("input[name=method]:checked", "#install").val()=="zip"){' . PHP_EOL;
$script .= '    $("#install\\\\:\\\\:zip_file").removeAttr("disabled");' . PHP_EOL;
$script .= '    $("#install\\\\:\\\\:directory").attr("disabled","");' . PHP_EOL;
$script .= '  }else{' . PHP_EOL;
$script .= '    $("#install\\\\:\\\\:zip_file").attr("disabled","");' . PHP_EOL;
$script .= '    $("#install\\\\:\\\\:directory").removeAttr("disabled");' . PHP_EOL;
$script .= '  }' . PHP_EOL;
$script .= '});' . PHP_EOL;
$script .= '$("#install").submit(function(){' . PHP_EOL;
$script .= '  if($("input[name=method]:checked", "#install").val()=="zip"){' . PHP_EOL;
$script .= '    $("#install\\\\:\\\\:zip_file").removeAttr("disabled");' . PHP_EOL;
$script .= '    $("#install\\\\:\\\\:directory").attr("disabled","");' . PHP_EOL;
$script .= '  }else{' . PHP_EOL;
$script .= '    $("#install\\\\:\\\\:zip_file").attr("disabled","");' . PHP_EOL;
$script .= '    $("#install\\\\:\\\\:directory").removeAttr("disabled");' . PHP_EOL;
$script .= '  }' . PHP_EOL;
$script .= '});' . PHP_EOL;
$installBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'button', 'a' => 'submit'), 'ic' => 'install');
$form = $page->getPlugin('form', array('install', WebApp::action('modules', 'pre_install', false), 'post', 'multipart/form-data', ''));
$form->setIndent(6)->addOptionGrid('radio', 'Install Method', 'method', array(array('i' => 'zip', 'l' => 'Upload Zip', 'v' => 'zip', 'c' => false, 'd' => false), array('i' => 'dir', 'l' => 'From Directory', 'v' => 'dir', 'c' => false, 'd' => false)), array('t' => 'Select the mode to install the module'), array())->addFileUpload('Zip upload', 'zip_file', array('t' => 'Browse to the zip file containing the module', 'p' => 'C:\\Users\\Someone\\module.zip'), array('d' => true))->addTextField('Directory', 'directory', '', array('t' => 'Path to the directory containing the module', 'p' => '/temp/module'), array('d' => true))->addBtnLine(array('install' => $installBtn))->addHTML('<iframe id="install_tgt" name="install_tgt" src="#" style="width:0;height:0;border:0px solid #fff;"></iframe>')->addScript($script);
$form->build();
print $form->getForm();
?>
  </div>
</div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:30,代码来源:install.php

示例6: array

$module_query->execute();
$module_query->bind_result($mname, $module_id);
$module_data = array();
while ($module_query->fetch()) {
    $module_data[$module_id] = $mname;
}
$modules = array('-1' => array('v' => '-1', 'n' => 'Select a module', 's' => true, 'd' => true));
foreach ($module_data as $k => $v) {
    $modules[$k]['v'] = $k;
    $modules[$k]['n'] = $v;
    $modules[$k]['s'] = false;
    $modules[$k]['d'] = false;
}
$closeBtn = array('a' => array('t' => 'url', 'a' => '../menu_edit/' . $parentID), 'ic' => 'remove-sign');
$saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'menu_add\', this, \'save\')'), 'ic' => 'floppy-disk');
$form = $page->getPlugin('form', array('menu_add', WebApp::action('core', 'menu_addsub', true), 'post'));
$form->setColumns(3, 9)->setIndent('    ')->addHiddenField('parent', $parentID)->addSelect('Module', 'module', $modules, array('t' => 'The module for the menu item.'), array('v' => true, 'vm' => array('selectRequiredMsg' => array('m' => 'A module is required.', 's' => 'danger')), 'vo' => 'validateOn:["blur"]', 'r' => true))->addSelect2('Page', 'PID', '', array('t' => 'The page the menu item will link to. * denotes admin page'), array('r' => true))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn));
$form->build();
?>

<div class="row pane">
  <div class="col-xs-12">
    <h1 class="page-header">New Dropdown Menu Item</h1>
    <?php 
print $form->getForm();
?>
  </div>
</div>
<script type="text/javascript">
var module_id = '';
$('[name="module"]').change(function(e) {
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:menu_addsub.php

示例7: array

			alert("Please select one user only to edit");
		}
		return false;
	});
	
})
        </script>
      </div>
    </div>
  </div>
</div>

<?php 
$delete_modal = $page->getPlugin('modalconf', array('delete', 'user', WebApp::action('user', 'user_delete', true), 'post'));
$delete_modal->addDefaultConfig();
$delete_modal->form->addPasswordField('Your Password', 'pwd', '', array('t' => 'Your password', 'p' => 'Your Password'), array('t' => 'password', 'w' => true, 'r' => true));
$delete_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Delete', 'trash')->build();
print $delete_modal->getModal();
$enable_modal = $page->getPlugin('modalconf', array('enable', 'user', WebApp::action('user', 'user_enable', true), 'post'));
$enable_modal->addDefaultConfig();
$enable_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('success', 'Enable', 'ok-sign')->build();
print $enable_modal->getModal();
$disable_modal = $page->getPlugin('modalconf', array('disable', 'user', WebApp::action('user', 'user_disable', true), 'post'));
$disable_modal->addDefaultConfig();
$disable_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Disable', 'ban-circle')->build();
print $disable_modal->getModal();
$setpassword_modal = $page->getPlugin('modalconf', array('set password for', 'user', WebApp::action('user', 'setpassword', true), 'post'));
$setpassword_modal->addDefaultConfig();
$setpassword_modal->form->setColumns(4, 5, 3)->addPasswordField('New Password', 'n_pwd', '', array('t' => 'The users\' new password', 'p' => 'New Password'), array('t' => 'password', 'v' => true, 'w' => true, 'r' => true))->addTextField('Confirm Password', 'c_pwd', '', array('t' => 'Confirm user\'s new password.', 'p' => 'Confirm Password'), array('t' => 'password', 'vt' => 'confirm', 'v' => true, 'vm' => array('confirmInvalidMsg' => array('m' => 'Passwords do not match.', 's' => 'danger')), 'vc' => 'user_set_password_for_form\\:\\:n_pwd', 'vo' => 'validateOn:["blur", "change"]'));
$setpassword_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('warning', 'Set Password', 'lock')->build();
print $setpassword_modal->getModal();
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:user_view.php

示例8: array

<div class="row pane">
  <div class="col-sm-12 col-md-11 col-lg-11 col-lg-offset-1 col-md-offset-1">
    <h1 class="page-header">Change my Password</h1>
<?php 
$cancelBtn = array('s' => B_T_DEFAULT, 'a' => array('t' => 'url', 'a' => '../'), 'ic' => 'remove');
$changeBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'change_mod();'), 'ic' => 'ok');
$form = $page->getPlugin('form', array('password', WebApp::action('user', 'password', true), 'post'));
$form->setIndent('  ')->addPasswordField('Old Password', 'o_pwd', '', array('t' => 'Enter your old password', 'p' => 'Old Password'), array('r' => true))->addPasswordField('New Password', 'n_pwd', '', array('t' => 'Enter your new password', 'p' => 'New Password'), array('r' => true, 'v' => true, 'w' => true))->addTextField('Confirm Password', 'c_pwd', '', array('t' => 'Confirm your new password.', 'p' => 'Confirm Password'), array('t' => 'password', 'vt' => 'confirm', 'v' => true, 'vm' => array('confirmInvalidMsg' => array('m' => 'Passwords do not match.', 's' => 'danger')), 'vc' => 'password\\:\\:n_pwd', 'vo' => 'validateOn:["blur"]'))->addBtnLine(array('cancel' => $cancelBtn, 'change' => $changeBtn));
$form->build();
print $form->getForm();
$checkMod = $page->getPlugin('modalconf', array('change', 'password', WebApp::action('user', 'password', true), 'post'));
$checkMod->setContent('<p>Are you sure you want to change your password?</p>')->setDefaultModal()->setRightBtn('primary', 'Change', 'ok', 'button', 'processForm(\'password\', this, \'change\');$("#change_passwords").modal("hide");')->addShowScript()->build();
print $checkMod->getModal();
?>
  </div>
</div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:16,代码来源:profile_password.php

示例9: date

    } else {
        $groups[$k]['s'] = false;
    }
    $groups[$k]['d'] = 0;
}
if ($publish_f === NULL) {
    $publish_f = '';
} else {
    $publish_f = date(DATET_SQL, strtotime($publish_f));
}
if ($publish_u === NULL) {
    $publish_u = '';
} else {
    $publish_u = date(DATET_SQL, strtotime($publish_u));
}
$closeBtn = array('a' => array('t' => 'url', 'a' => '../article_view'), 'ic' => 'remove-sign');
$saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'article_edit\', this, \'save\')'), 'ic' => 'floppy-disk');
$applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'article_edit\', this, \'apply\')'), 'ic' => 'ok-sign');
$form = $page->getPlugin('form', array('article_edit', WebApp::action('article', 'user_edit', true), 'post'));
$form->setIndent('    ')->setColumns(2, 10)->addTextField('ID', 'id', $ID, array('t' => 'ID of Article'), array('ro' => true))->addTextField('Title', 'title', $title, array('t' => 'Title of Article', 'p' => 'Article Title'), array('r' => true, 'v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'An Article Title is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'An Article Title is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Article title is limited to 250 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 250, validateOn:["blur"]'))->addTextField('Article ID', 'aid', $aid, array('t' => 'Article ID'), array('ro' => true))->addButtonGroup('Published', 'publish', array(array('i' => 'publishY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes <span class="' . B_ICON . ' ' . B_ICON . '-eye-open"></span>', 'c' => $publish), array('i' => 'publishN', 's' => B_T_FAIL, 'v' => 0, 'l' => 'No <span class="' . B_ICON . ' ' . B_ICON . '-eye-close"></span>', 'c' => not($publish))), array('t' => 'An article has to be published (regardless of the permission settings) before it can be viewed'))->addDateTime('Publish From', 'p_from', $publish_f, array('t' => 'Date/time to start publishing, leave blank for always'))->addDateTime('Publish To', 'p_to', $publish_u, array('t' => 'Date/time to finish publishing, leave blank for always'))->addTextArea('Article', 'article', $article, 20, array('t' => 'The article'), array('ck' => true, 'ckt' => 'Full'))->addSelect('User', 'user', $users, array('t' => 'Select the owner of this article (this user gains the user permissions)'))->addSelect('Group', 'group', $groups, array('t' => 'Select the owner of this article (this group gains the group permissions)'))->addTextField('Revision', 'rev', $revision, array('t' => 'Number of times this article has been revised.'), array('ro' => true))->addTextField('Hits', 'hits', $hits, array('t' => 'Number of times this article has been loaded.'), array('ro' => true))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn));
$form->build();
?>

<div class="row pane">
  <div class="col-xs-12">
    <h1 class="page-header">Edit Article</h1>
<?php 
print $form->getForm();
?>
  </div>
</div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:article_edit.php

示例10: array

<?php

$closeBtn = array('a' => array('t' => 'url', 'a' => 'option_view'), 'ic' => 'remove-sign');
$saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'option_add\', this, \'save\')'), 'ic' => 'floppy-disk');
$form = $page->getPlugin('form', array('option_add', WebApp::action('core', 'option_add', true), 'post'));
$form->setIndent('    ')->setColumns(2, 6)->addTextField('Option Name', 'name', '', array('t' => 'Option name.', 'p' => 'Name'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A name is required.', 's' => 'danger'), 'textfieldMinCharsMsg' => array('m' => 'A name is required.', 's' => 'danger'), 'textfieldMaxCharsMsg' => array('m' => 'Name is limited to 100 characters.', 's' => 'danger')), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'd' => false, 'r' => true))->addTextArea('Value', 'value', '', 6, array('t' => 'Value for option.', 'p' => 'Option'), array('v' => true, 'vm' => array('textareaRequiredMsg' => array('m' => 'An option value is required.', 's' => B_T_FAIL), 'textareaMinCharsMsg' => array('m' => 'An option value is required.', 's' => B_T_FAIL), 'textareaMaxCharsMsg' => array('m' => 'Option values are limited to 5000 characters.', 's' => B_T_FAIL)), 'vo' => 'maxChars: 5000, userCharacterMasking:false, validateOn:["blur", "change"]', 'c' => true, 'r' => true))->addTextArea('Description', 'desc', '', 3, array('t' => 'Description of Option', 'p' => 'Option Description'), array('v' => true, 'vm' => array('textareaMaxCharsMsg' => array('m' => 'Option description is limited to 250 chars.', 's' => B_T_FAIL)), 'vo' => 'maxChars: 250, useCharacterMasking:false, validateOn:["blur", "change"]', 'c' => true, 'r' => false))->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn));
$form->build();
?>

<div class="row pane">
  <div class="col-xs-12">
    <h1 class="page-header">New Option</h1>
    <?php 
print $form->getForm();
?>
  </div>
</div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:17,代码来源:option_add.php

示例11: if

	});
	$("#edit_btn").click(function(e){
		var groups = $('.groups_check').filter(":checked")
		if(groups.length==1){
			var group_id = groups.first().val();
			document.location.href = "group_edit/"+group_id;
		}else if(groups.length>1){
			alert("Please select one group only to edit");
		}
		return false;
	});
})
        </script>
      </div>
    </div>
  </div>
</div>
<?php 
$delete_modal = $page->getPlugin('modalconf', array('delete', 'group', WebApp::action('user', 'group_del', true), 'post'));
$delete_modal->addDefaultConfig();
$delete_modal->form->addPasswordField('Your Password', 'pwd', '', array('t' => 'Your password', 'p' => 'Your Password'), array('t' => 'password', 'w' => true, 'r' => true));
$delete_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Delete', 'trash')->build();
print $delete_modal->getModal();
$enable_modal = $page->getPlugin('modalconf', array('enable', 'group', WebApp::action('user', 'group_enable', true), 'post'));
$enable_modal->addDefaultConfig();
$enable_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('success', 'Enable', 'ok-sign')->build();
print $enable_modal->getModal();
$disable_modal = $page->getPlugin('modalconf', array('disable', 'group', WebApp::action('user', 'group_disable', true), 'post'));
$disable_modal->addDefaultConfig();
$disable_modal->setDefaultContent()->SetDefaultModal()->setRightBtn('danger', 'Disable', 'ban-circle')->build();
print $disable_modal->getModal();
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:group_view.php

示例12: array

<?php

$config = $this->parent->parent->config->config;
$closeBtn = array('a' => array('t' => 'url', 'a' => '../'), 'ic' => 'remove-sign');
$form = $page->getPlugin('form', array('system_info', WebApp::action('core', 'system_info', true), 'post'));
$form->setColumns(3, 9)->setIndent('    ')->addHTML('<h3>Web Server Info</h3>', false)->addTextField('IP', 'server_addr', Server::get('Server_Addr'), array('t' => 'IP Address of the server'), array('ro' => true))->addTextField('Name', 'server_name', Server::get('Server_Name'), array('t' => 'Server host name'), array('ro' => true))->addTextField('Software', 'server_software', Server::get('Server_Software'), array('t' => 'Software powering the server'), array('ro' => true))->addTextField('Signature', 'server_signature', array_pop(GUMP::xss_clean(array(Server::get('Server_Signature')))), array('t' => ''), array('ro' => true))->addTextField('Port', 'server_port', Server::get('Server_Port'), array('t' => 'Port the server is listening on'), array('ro' => true))->addTextField('Gateway Interface', 'server_gateway', Server::get('Gateway_Interface'), array('t' => 'How the web server is communicating with PHP'), array('ro' => true))->addTextField('Protocol', 'protocol', Server::get('Server_Protocol'), array('t' => 'Protocol used to communicate between the web server and client'), array('ro' => true))->addTextField('PHP Version', 'php_version', phpversion(), array('t' => 'Software powering the website'), array('ro' => true))->addTextField('HTTPS', 'server_https', Server::get('HTTPS'), array('t' => 'HTTPS Status of the server'), array('ro' => true))->addHTML('<h3>Database</h3>', false)->addHTML('<h4>Read Server</h4>', false)->addTextField('Connection', 'mysqlr_con', $this->mySQL_r->host_info, array('t' => ''), array('ro' => true))->addTextField('Version', 'mysqlr_ver', $this->mySQL_r->server_info, array('t' => ''), array('ro' => true))->addTextField('Client', 'mysqlr_cli', $this->mySQL_r->client_info, array('t' => ''), array('ro' => true))->addHTML('<h4>Write Server</h4>', false)->addTextField('Connection', 'mysqlw_con', $this->mySQL_w->host_info, array('t' => ''), array('ro' => true))->addTextField('Version', 'mysqlw_ver', $this->mySQL_w->server_info, array('t' => ''), array('ro' => true))->addTextField('Client', 'mysqlw_cli', $this->mySQL_w->client_info, array('t' => ''), array('ro' => true));
$form->build();
?>
<div class="row pane">
  <div class="col-xs-12">
    <h1 class="page-header">System Information</h1>
    <?php 
print $form->getForm();
?>
  </div>
</div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:16,代码来源:system_info.php

示例13: strtotime

    $row['username'] = Table::addCell($username);
    $row['ip'] = Table::addCell($ip);
    $row['created'] = Table::addCell(date(DATET_SHORT, strtotime($created)));
    $row['lpr'] = Table::addCell(date(DATET_SHORT, strtotime($lpr)));
    $row['del'] = Table::addCell('<a href="#" onclick="processData(\'/action/user/session_destroy/' . $session_id . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-remove-sign"</a>');
    $row['lock'] = Table::addCell('<a href="#" onclick="processData(\'/action/user/session_lock/' . $session_id . '\')"><span class="' . B_ICON . ' ' . B_ICON . '-lock"</a>');
    $session_view->addRow($row);
}
$session_view->build();
print $session_view->getTable();
?>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
<?php 
$check = new TableCheck();
$check->setType('session')->create();
print $check->getScript();
?>
</script>
<?php 
$destroy_mod = $page->getPlugin('modalconf', array('destroy', 'session', WebApp::action('user', 'session_destroy?m=m', true), 'post'));
$destroy_mod->addDefaultConfig();
$destroy_mod->setDefaultContent()->setDefaultModal()->setRightBtn('danger', 'Destroy', 'remove-sign')->build();
print $destroy_mod->getModal();
$lock_mod = $page->getPlugin('modalconf', array('lock', 'session', WebApp::action('user', 'session_lock?m=m', true), 'post'));
$lock_mod->addDefaultConfig();
$lock_mod->setDefaultContent()->setDefaultModal()->setRightBtn('danger', 'Lock', 'lock')->build();
print $lock_mod->getModal();
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:sessions.php

示例14: ksort

        $pdata['l'] = $title;
        $pdata['v'] = $ID;
        $pdata['d'] = false;
        if (in_array($ID, $gpages)) {
            $pdata['c'] = true;
        } else {
            $pdata['c'] = false;
        }
        $pages[ucfirst($module)][$ID] = $pdata;
    }
}
ksort($pages);
$closeBtn = array('a' => array('t' => 'url', 'a' => '../group_view'), 'ic' => 'remove-sign');
$saveBtn = array('s' => B_T_SUCCESS, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'group_edit\', this, \'save\')'), 'ic' => 'floppy-disk');
$applyBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'group_edit\', this, \'apply\')'), 'ic' => 'ok-sign');
$form = $page->getPlugin('form', array('group_edit', WebApp::action('user', 'group_edit', true), 'post'));
$form->setIndent('    ');
$form->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn));
$form->addTextField('Group ID', 'id', $GID, array('t' => 'ID of Group (Unique)'), array('ro' => true));
$form->addTextField('Name', 'name', $name, array('t' => 'Name of Group (Unique)', 'p' => 'Group Name'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Group name is required.', 's' => B_T_FAIL), 'textfieldMinCharsMsg' => array('m' => 'A Group name is required.', 's' => B_T_FAIL), 'textfieldMaxCharsMsg' => array('m' => 'Group name is limited to 100 chars.', 's' => B_T_FAIL)), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'r' => true));
$form->addTextArea('Description', 'desc', $desc, 3, array('t' => 'Description of Group', 'p' => 'Group Description'), array('v' => true, 'vm' => array('textareaMaxCharsMsg' => array('m' => 'Group description is limited to 250 chars.', 's' => B_T_FAIL)), 'vo' => 'maxChars: 250, useCharacterMasking:false, validateOn:["blur", "change"]', 'c' => true, 'r' => false));
$form->addSelect('Type', 'type', $types, array('t' => 'Primary Groups are the base group from which additional privileges are added via Secondary Groups.'), array('r' => true, 'v' => true, 'vm' => array('selectRequiredMsg selectInvalidMsg' => array('s' => B_T_FAIL, 'm' => 'A group type is required.')), 'vo' => 'validateOn:["blur"]'));
$form->addButtonGroup('Enabled', 'enabled', array(array('i' => 'enabledY', 's' => B_T_SUCCESS, 'v' => 1, 'l' => 'Yes', 'c' => $enabled), array('i' => 'enabledN', 's' => B_T_FAIL, 'v' => 0, 'l' => 'No', 'c' => not($enabled))), array('t' => 'Disabling a group automatically logs all users that belong to that group out and they cannot log back in.'));
$form->addCollapseOptGrid('check', 'Pages', 'pages[]', $pages, array('t' => 'A checked box indicates that this group is able to access that page. Please note, when calculating page access privileges, TTP (True Takes Priority) is used. This means if a user is granted access from one group and barred from another, they will still be able to access that page.'), array('r' => true, 'v' => false));
$form->addBtnLine(array('close' => $closeBtn, 'save' => $saveBtn, 'apply' => $applyBtn));
$form->build();
?>

<div class="row pane">
  <div class="col-xs-12">
<?php 
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:group_edit.php

示例15: array

  <div class="col-sm-12 col-md-11 col-lg-11 col-lg-offset-1 col-md-offset-1">
    <h1 class="page-header">Edit my Details</h1>
<?php 
$userID = $page->parent->user->getUserID();
$user_query = $mySQL_r->prepare("SELECT `username`,`f_name`,`s_name`,`email`,`pwd_reset` FROM `core_users` WHERE `id`=?");
if ($user_query === false) {
    print '<h2>Failed to load details!</h2>' . PHP_EOL;
} else {
    $user_query->bind_param('i', $userID);
    $user_query->execute();
    $user_query->bind_result($username, $f_name, $s_name, $email, $passwords);
    $user_query->store_result();
    $user_query->fetch();
    $cancelBtn = array('s' => B_T_DEFAULT, 'a' => array('t' => 'url', 'a' => '../'), 'ic' => 'remove');
    $changeBtn = array('s' => B_T_PRIMARY, 'a' => array('t' => 'url', 'a' => '#', 'oc' => 'processForm(\'details\', this, \'change\');'), 'ic' => 'floppy-disk');
    $form = $page->getPlugin('form', array('details', WebApp::action('user', 'change_details', true), 'post'));
    $form->setIndent('  ')->addHiddenField('userid', $userID, 'userid')->addTextField('First Name', 'f_name', $f_name, array('t' => 'Your First Name', 'p' => 'First Name'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A First Name is required.', 's' => 'danger'), 'textfieldMinCharsMsg' => array('m' => 'A First Name is required.', 's' => 'danger'), 'textfieldMaxCharsMsg' => array('m' => 'First Name is limited to 100 characters.', 's' => 'danger')), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'd' => false, 'r' => true))->addTextField('Surname', 's_name', $s_name, array('t' => 'Your Surname.', 'p' => 'Surname'), array('v' => true, 'vm' => array('textfieldRequiredMsg' => array('m' => 'A Surname is required.', 's' => 'danger'), 'textfieldMinCharsMsg' => array('m' => 'A Surname is required.', 's' => 'danger'), 'textfieldMaxCharsMsg' => array('m' => 'Surname is limited to 100 characters.', 's' => 'danger')), 'vo' => 'minChars: 0, maxChars: 100, validateOn:["blur"]', 'd' => false, 'r' => true))->addTextField('Username', 'username', $username, array('t' => 'Username. Used for logging in.', 'p' => 'Username'), array('v' => false, 'd' => false, 'ro' => true))->addBtnLine(array('cancel' => $cancelBtn, 'Save' => $changeBtn));
    $form->build();
    print $form->getForm();
    /*$checkMod = $page->getPlugin('modalconf', array('change', 'email', WebApp::action('user','e,ao;', true), 'post'));
    $checkMod
    		->setContent('<p>Are you sure you want to change your email address?<br />If so, your account will be deactivated and a reactivation email will be sent to the new address.</p>')
    		->setDefaultModal()
    		->setTitle('Change Email Address?')
    		->setRightBtn('primary','Change','ok', 'button', 'processForm(\'details\', this, \'change\');$(\'#change_emails\').modal(\'hide\');')
    		->addShowScript()
    		->build();
    print $checkMod->getModal();*/
}
?>
  </div>
开发者ID:huwcbjones,项目名称:WebFramework,代码行数:31,代码来源:profile_details.php


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