本文整理汇总了PHP中doCreate函数的典型用法代码示例。如果您正苦于以下问题:PHP doCreate函数的具体用法?PHP doCreate怎么用?PHP doCreate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了doCreate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doSaveCreate
/**
* Actually creates the new aggregate in the database
*/
function doSaveCreate()
{
global $data, $lang, $_reload_browser;
// Check inputs
if (trim($_REQUEST['name']) == '') {
doCreate($lang['straggrneedsname']);
return;
} else {
if (trim($_REQUEST['basetype']) == '') {
doCreate($lang['straggrneedsbasetype']);
return;
} else {
if (trim($_REQUEST['sfunc']) == '') {
doCreate($lang['straggrneedssfunc']);
return;
} else {
if (trim($_REQUEST['stype']) == '') {
doCreate($lang['straggrneedsstype']);
return;
}
}
}
}
$status = $data->createAggregate($_REQUEST['name'], $_REQUEST['basetype'], $_REQUEST['sfunc'], $_REQUEST['stype'], $_REQUEST['ffunc'], $_REQUEST['initcond'], $_REQUEST['sortop'], $_REQUEST['aggrcomment']);
if ($status == 0) {
$_reload_browser = true;
doDefault($lang['straggrcreated']);
} else {
doCreate($lang['straggrcreatedbad']);
}
}
示例2: doSaveCreate
/**
* Actually creates the new schema in the database
*/
function doSaveCreate()
{
global $data, $lang, $_reload_browser;
// Check that they've given a name
if ($_POST['formName'] == '') {
doCreate($lang['strschemaneedsname']);
} else {
$status = $data->createSchema($_POST['formName'], $_POST['formAuth'], $_POST['formComment']);
if ($status == 0) {
$_reload_browser = true;
doDefault($lang['strschemacreated']);
} else {
doCreate($lang['strschemacreatedbad']);
}
}
}
示例3: preg_match
}
if (!isNull($_GET['to'])) {
$to = preg_match($pathRegEx, $_GET['to']) ? null : $_GET['to'];
$toHTML = htmlspecialchars($to);
$toURL = escape($to);
}
/** perform requested action **/
if ($do) {
switch ($do) {
case 'login':
exit(doLogin($_POST['pwd']));
case 'logout':
exit(doLogout());
case 'create':
token_check();
exit(doCreate($_POST['file'], $_POST['folder'], $path));
case 'upload':
token_check();
exit(doUpload($path));
case 'chmod':
token_check();
exit(doChmod($subject, $path, $_POST['mod']));
case 'extract':
token_check();
exit(doExtract($subject, $path));
case 'readFile':
exit(doReadFile($subject, $path));
case 'rename':
token_check();
exit(doRename($subject, $path));
case 'delete':
示例4: doSaveCreate
/**
* Actually creates the new tablespace in the cluster
*/
function doSaveCreate()
{
global $data;
global $lang;
// Check data
if (trim($_POST['formSpcname']) == '') {
doCreate($lang['strtablespaceneedsname']);
} elseif (trim($_POST['formLoc']) == '') {
doCreate($lang['strtablespaceneedsloc']);
} else {
// Default comment to blank if it isn't set
if (!isset($_POST['formComment'])) {
$_POST['formComment'] = null;
}
$status = $data->createTablespace($_POST['formSpcname'], $_POST['formOwner'], $_POST['formLoc'], $_POST['formComment']);
if ($status == 0) {
doDefault($lang['strtablespacecreated']);
} else {
doCreate($lang['strtablespacecreatedbad']);
}
}
}
示例5: create
$of->Value = $op->notes;
break;
case 'create':
$op = create($args);
$gui->closed_on_date = $args->closed_on_date;
break;
case 'do_delete':
$op = doDelete($args, $build_mgr);
break;
case 'do_update':
$op = doUpdate($args, $build_mgr, $tplan_mgr, $date_format_cfg);
$of->Value = $op->notes;
$templateCfg->template = $op->template;
break;
case 'do_create':
$op = doCreate($args, $build_mgr, $tplan_mgr, $date_format_cfg);
$of->Value = $op->notes;
$templateCfg->template = $op->template;
break;
}
// BUGID 3716
$dummy = null;
$gui->release_date = isset($op->status_ok) && $op->status_ok && $args->release_date != "" ? localize_dateOrTimeStamp(null, $dummy, 'date_format', $args->release_date) : $args->release_date_original;
$gui->closed_on_date = $args->closed_on_date;
$gui->operation_descr = $op->operation_descr;
$gui->user_feedback = $op->user_feedback;
$gui->buttonCfg = $op->buttonCfg;
$gui->mgt_view_events = $_SESSION['currentUser']->hasRight($db, "mgt_view_events", $args->tproject_id, $args->tplan_id);
$gui->editorType = $editorCfg['type'];
$smarty = new TLSmarty();
renderGui($smarty, $args, $tplan_mgr, $templateCfg, $of, $gui);
示例6: str_replace
if (isset($_GET['subject']) && !isNull($_GET['subject'])) {
$subject = str_replace('/', null, $_GET['subject']);
$subjectURL = escape($subject);
$subjectHTML = htmlspecialchars($subject);
}
switch ($do) {
case 'login':
exit(doLogin());
case 'logout':
exit(doLogout());
case 'shell':
nonce_check();
exit(shell_exec($_POST['cmd']));
case 'create':
nonce_check();
exit(doCreate($_POST['f_name'], $_GET['f_type'], $path));
case 'upload':
nonce_check();
exit(doUpload($path));
case 'chmod':
nonce_check();
exit(doChmod($subject, $path, $_POST['mod']));
case 'extract':
nonce_check();
exit(doExtract($subject, $path));
case 'readFile':
exit(doReadFile($subject, $path));
case 'rename':
nonce_check();
exit(doRename($subject, $path));
case 'delete':
示例7: doSaveCreate
/**
* Actually creates the new domain in the database
*/
function doSaveCreate()
{
global $data, $lang;
if (!isset($_POST['domcheck'])) {
$_POST['domcheck'] = '';
}
// Check that they've given a name and a definition
if ($_POST['domname'] == '') {
doCreate($lang['strdomainneedsname']);
} else {
$status = $data->createDomain($_POST['domname'], $_POST['domtype'], $_POST['domlength'], $_POST['domarray'] != '', isset($_POST['domnotnull']), $_POST['domdefault'], $_POST['domcheck']);
if ($status == 0) {
doDefault($lang['strdomaincreated']);
} else {
doCreate($lang['strdomaincreatedbad']);
}
}
}
示例8: doSaveCreate
/**
* Actually creates the new view in the database
*/
function doSaveCreate()
{
global $data, $lang, $_reload_browser;
// Default tablespace to null if it isn't set
if (!isset($_POST['formSpc'])) {
$_POST['formSpc'] = null;
}
// Default comment to blank if it isn't set
if (!isset($_POST['formComment'])) {
$_POST['formComment'] = null;
}
// Default collate to blank if it isn't set
if (!isset($_POST['formCollate'])) {
$_POST['formCollate'] = null;
}
// Default ctype to blank if it isn't set
if (!isset($_POST['formCType'])) {
$_POST['formCType'] = null;
}
// Check that they've given a name and a definition
if ($_POST['formName'] == '') {
doCreate($lang['strdatabaseneedsname']);
} else {
$status = $data->createDatabase($_POST['formName'], $_POST['formEncoding'], $_POST['formSpc'], $_POST['formComment'], $_POST['formTemplate'], $_POST['formCollate'], $_POST['formCType']);
if ($status == 0) {
$_reload_browser = true;
doDefault($lang['strdatabasecreated']);
} else {
doCreate($lang['strdatabasecreatedbad']);
}
}
}
示例9: doSaveCreate
/**
* Actually creates the new type in the database
*/
function doSaveCreate()
{
global $data;
global $lang;
// Check that they've given a name and a length.
// Note: We're assuming they've given in and out functions here
// which might be unwise...
if ($_POST['typname'] == '') {
doCreate($lang['strtypeneedsname']);
} elseif ($_POST['typlen'] == '') {
doCreate($lang['strtypeneedslen']);
} else {
$status = $data->createType($_POST['typname'], $_POST['typin'], $_POST['typout'], $_POST['typlen'], $_POST['typdef'], $_POST['typelem'], $_POST['typdelim'], isset($_POST['typbyval']), $_POST['typalign'], $_POST['typstorage']);
if ($status == 0) {
doDefault($lang['strtypecreated']);
} else {
doCreate($lang['strtypecreatedbad']);
}
}
}
示例10: doSaveCreate
/**
* Actually creates the new group in the database
*/
function doSaveCreate()
{
global $data;
global $lang;
if (!isset($_POST['members'])) {
$_POST['members'] = array();
}
// Check form vars
if (trim($_POST['name']) == '') {
doCreate($lang['strgroupneedsname']);
} else {
$status = $data->createGroup($_POST['name'], $_POST['members']);
if ($status == 0) {
doDefault($lang['strgroupcreated']);
} else {
doCreate($lang['strgroupcreatedbad']);
}
}
}
示例11: testlinkInitPage
testlinkInitPage($db, false, false, "checkRights");
$templateCfg = templateConfiguration();
$args = init_args();
$op = new stdClass();
$op->user_feedback = '';
$highlight = initialize_tabsmenu();
$actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate', 'resetPassword' => 'doUpdate');
switch ($args->doAction) {
case "edit":
$highlight->edit_user = 1;
$user = new tlUser($args->user_id);
$user->readFromDB($db);
break;
case "doCreate":
$highlight->create_user = 1;
$op = doCreate($db, $args);
$user = $op->user;
$templateCfg->template = $op->template;
break;
case "doUpdate":
$highlight->edit_user = 1;
$sessionUserID = $_SESSION['currentUser']->dbID;
$op = doUpdate($db, $args, $sessionUserID);
$user = $op->user;
break;
case "resetPassword":
$highlight->edit_user = 1;
$user = new tlUser($args->user_id);
$user->readFromDB($db);
$op = createNewPassword($db, $args, $user);
break;
示例12: doSaveCreate
/**
* Actually creates the new role in the database
*/
function doSaveCreate()
{
global $data, $lang;
if (!isset($_POST['memberof'])) {
$_POST['memberof'] = array();
}
if (!isset($_POST['members'])) {
$_POST['members'] = array();
}
if (!isset($_POST['adminmembers'])) {
$_POST['adminmembers'] = array();
}
// Check data
if ($_POST['formRolename'] == '') {
doCreate($lang['strroleneedsname']);
} else {
if ($_POST['formPassword'] != $_POST['formConfirm']) {
doCreate($lang['strpasswordconfirm']);
} else {
$status = $data->createRole($_POST['formRolename'], $_POST['formPassword'], isset($_POST['formSuper']), isset($_POST['formCreateDB']), isset($_POST['formCreateRole']), isset($_POST['formInherits']), isset($_POST['formCanLogin']), $_POST['formConnLimit'], $_POST['formExpires'], $_POST['memberof'], $_POST['members'], $_POST['adminmembers']);
if ($status == 0) {
doDefault($lang['strrolecreated']);
} else {
doCreate($lang['strrolecreatedbad']);
}
}
}
}
示例13: create
$of->Value = $op->notes;
break;
case 'create':
$op = create($args);
$gui->closed_on_date = $args->closed_on_date;
break;
case 'do_delete':
$op = doDelete($args, $build_mgr);
break;
case 'do_update':
$op = doUpdate($args, $build_mgr, $tplan_mgr);
$of->Value = $op->notes;
$templateCfg->template = $op->template;
break;
case 'do_create':
$op = doCreate($args, $build_mgr, $tplan_mgr);
$of->Value = $op->notes;
$templateCfg->template = $op->template;
break;
}
$gui->release_date = $args->release_date;
$gui->operation_descr = $op->operation_descr;
$gui->user_feedback = $op->user_feedback;
$gui->buttonCfg = $op->buttonCfg;
$gui->mgt_view_events = $_SESSION['currentUser']->hasRight($db, "mgt_view_events");
$gui->editorType = $editorCfg['type'];
if (trim($gui->release_date) == '') {
$gui->release_date = '0000-00-00';
}
renderGui($smarty, $args, $tplan_mgr, $templateCfg, $of, $gui);
/*
示例14: Template
include_once $basedir . '/lib/DBEngine.class.php';
include_once $basedir . '/lib/Template.class.php';
@session_start();
// Start the session
$failed = false;
$t = new Template('phpScheduleIt ' . translate('Setup'), 1);
$t->printHTMLHeader();
doPrintHeader();
if (checkConfig()) {
if (isset($_POST['login'])) {
setVars();
doLogin();
} else {
if (isset($_POST['create'])) {
$db = dbConnect();
doCreate();
doFinish();
} else {
doPrintForm();
}
}
}
$t->printHTMLFooter();
/**
* Prints html header
* @param none
*/
function doPrintHeader()
{
global $conf;
?>
示例15: doCreate
/**
* Displays a screen where they can enter a new table
*/
function doCreate($msg = '')
{
global $data, $misc;
global $lang;
if (!isset($_REQUEST['stage'])) {
$_REQUEST['stage'] = 1;
$default_with_oids = $data->getDefaultWithOid();
if ($default_with_oids == 'off') {
$_REQUEST['withoutoids'] = 'on';
}
}
if (!isset($_REQUEST['name'])) {
$_REQUEST['name'] = '';
}
if (!isset($_REQUEST['fields'])) {
$_REQUEST['fields'] = '';
}
if (!isset($_REQUEST['tblcomment'])) {
$_REQUEST['tblcomment'] = '';
}
if (!isset($_REQUEST['spcname'])) {
$_REQUEST['spcname'] = '';
}
switch ($_REQUEST['stage']) {
case 1:
// Fetch all tablespaces from the database
if ($data->hasTablespaces()) {
$tablespaces = $data->getTablespaces();
}
$misc->printTrail('schema');
$misc->printTitle($lang['strcreatetable'], 'pg.table.create');
$misc->printMsg($msg);
echo "<form action=\"tables.php\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n";
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", htmlspecialchars($_REQUEST['name']), "\" /></td>\n\t</tr>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strnumcols']}</th>\n";
echo "\t\t<td class=\"data\"><input name=\"fields\" size=\"5\" maxlength=\"{$data->_maxNameLen}\" value=\"", htmlspecialchars($_REQUEST['fields']), "\" /></td>\n\t</tr>\n";
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['stroptions']}</th>\n";
echo "\t\t<td class=\"data\"><label for=\"withoutoids\"><input type=\"checkbox\" id=\"withoutoids\" name=\"withoutoids\"", isset($_REQUEST['withoutoids']) ? ' checked="checked"' : '', " />WITHOUT OIDS</label></td>\n\t</tr>\n";
// Tablespace (if there are any)
if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) {
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strtablespace']}</th>\n";
echo "\t\t<td class=\"data1\">\n\t\t\t<select name=\"spcname\">\n";
// Always offer the default (empty) option
echo "\t\t\t\t<option value=\"\"", $_REQUEST['spcname'] == '' ? ' selected="selected"' : '', "></option>\n";
// Display all other tablespaces
while (!$tablespaces->EOF) {
$spcname = htmlspecialchars($tablespaces->fields['spcname']);
echo "\t\t\t\t<option value=\"{$spcname}\"", $tablespaces->fields['spcname'] == $_REQUEST['spcname'] ? ' selected="selected"' : '', ">{$spcname}</option>\n";
$tablespaces->moveNext();
}
echo "\t\t\t</select>\n\t\t</td>\n\t</tr>\n";
}
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strcomment']}</th>\n";
echo "\t\t<td><textarea name=\"tblcomment\" rows=\"3\" cols=\"32\">", htmlspecialchars($_REQUEST['tblcomment']), "</textarea></td>\n\t</tr>\n";
echo "</table>\n";
echo "<p><input type=\"hidden\" name=\"action\" value=\"create\" />\n";
echo "<input type=\"hidden\" name=\"stage\" value=\"2\" />\n";
echo $misc->form;
echo "<input type=\"submit\" value=\"{$lang['strnext']}\" />\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
echo "</form>\n";
break;
case 2:
global $lang;
// Check inputs
$fields = trim($_REQUEST['fields']);
if (trim($_REQUEST['name']) == '') {
$_REQUEST['stage'] = 1;
doCreate($lang['strtableneedsname']);
return;
} elseif ($fields == '' || !is_numeric($fields) || $fields != (int) $fields || $fields < 1) {
$_REQUEST['stage'] = 1;
doCreate($lang['strtableneedscols']);
return;
}
$types = $data->getTypes(true, false, true);
$types_for_js = array();
$misc->printTrail('schema');
$misc->printTitle($lang['strcreatetable'], 'pg.table.create');
$misc->printMsg($msg);
echo "<script src=\"tables.js\" type=\"text/javascript\"></script>";
echo "<form action=\"tables.php\" method=\"post\">\n";
// Output table header
echo "<table>\n";
echo "\t<tr><th colspan=\"2\" class=\"data required\">{$lang['strcolumn']}</th><th colspan=\"2\" class=\"data required\">{$lang['strtype']}</th>";
echo "<th class=\"data\">{$lang['strlength']}</th><th class=\"data\">{$lang['strnotnull']}</th>";
echo "<th class=\"data\">{$lang['struniquekey']}</th><th class=\"data\">{$lang['strprimarykey']}</th>";
echo "<th class=\"data\">{$lang['strdefault']}</th><th class=\"data\">{$lang['strcomment']}</th></tr>\n";
for ($i = 0; $i < $_REQUEST['fields']; $i++) {
if (!isset($_REQUEST['field'][$i])) {
$_REQUEST['field'][$i] = '';
}
if (!isset($_REQUEST['length'][$i])) {
$_REQUEST['length'][$i] = '';
}
//.........这里部分代码省略.........