本文整理汇总了PHP中formStart函数的典型用法代码示例。如果您正苦于以下问题:PHP formStart函数的具体用法?PHP formStart怎么用?PHP formStart使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formStart函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: addUserForm
function addUserForm ($listid) {
$html = formStart().'<input type=hidden name=listid value="'.$listid.'">
Add a user: <input type=text name=new value="" size=40><input type=submit
name=add value="Add">
</form>';
return $html;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:members.php
示例2: prepareOutput
function prepareOutput() {
global $outputdone;
if (!$outputdone) {
$outputdone = 1;
return formStart('name="outputform"').'<textarea name="output" rows=20 cols=50></textarea></form>';
}
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:7,代码来源:processbounces.php
示例3: prepareOutput
function prepareOutput()
{
global $outputdone;
if (!$outputdone) {
$outputdone = 1;
return formStart('name="outputform" class="readtestmailOutput" ') . '<textarea name="output" rows=10 cols=70></textarea></form>';
}
}
开发者ID:dehvCurtis,项目名称:phplist,代码行数:8,代码来源:readtestmail.php
示例4: addUserForm
function addUserForm($listid)
{
//nizar 'value'
$html = formStart() . '<input type=hidden name=listid value="' . $listid . '">
' . $GLOBALS['I18N']->get("Add a user") . ': <input type=text name=new value="" size=40><input type=submit
name=add value="' . $GLOBALS['I18N']->get('Add') . '">
</form>';
return $html;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:9,代码来源:members.php
示例5: addUserForm
function addUserForm($listid)
{
//nizar 'value'
$html = formStart(' class="membersAdd" ') . '<input type="hidden" name="listid" value="' . $listid . '" />
' . $GLOBALS['I18N']->get("Add a user") . ': <input type="text" name="new" value="" size="40" id="emailsearch"/>
<input class="submit" type="submit" name="add" value="' . $GLOBALS['I18N']->get('Add') . '" />
</form>';
return $html;
}
开发者ID:juvenal,项目名称:PHPlist,代码行数:9,代码来源:members.php
示例6: giveAlternative
function giveAlternative($table, $delete, $attributeid)
{
print $GLOBALS['I18N']->get('ReplaceAllWith') . formStart();
print '<select name=replace><option value="0">-- ' . $GLOBALS['I18N']->get('ReplaceWith') . '</option>';
$req = Sql_Query("select * from {$table} order by listorder,name");
while ($row = Sql_Fetch_array($req)) {
if ($row["id"] != $delete) {
printf('<option value="%d">%s</option>', $row["id"], $row["name"]);
}
}
print "</select>";
printf('<input type=hidden name="delete" value="%d">', $delete);
printf('<input type=hidden name="id" value="%d">', $attributeid);
printf('<input type=submit name="deleteandreplace" value="%s"></form>', $GLOBALS['I18N']->get('deleteandreplace'));
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:15,代码来源:editattributes.php
示例7: giveAlternative
function giveAlternative($table, $delete, $attributeid)
{
print $GLOBALS['I18N']->get('Alternatively you can replace all values with another one:') . formStart(' class="editattributesAlternatives" ');
print '<select name="replace"><option value="0">-- ' . $GLOBALS['I18N']->get('Replace with') . '</option>';
$req = Sql_Query("select * from {$table} order by listorder,name");
while ($row = Sql_Fetch_array($req)) {
if ($row["id"] != $delete) {
printf('<option value="%d">%s</option>', $row["id"], $row["name"]);
}
}
print "</select>";
printf('<input type="hidden" name="delete" value="%d" />', $delete);
printf('<input type="hidden" name="id" value="%d" />', $attributeid);
printf('<input class="submit" type="submit" name="deleteandreplace" value="%s" /><hr class="line" />', $GLOBALS['I18N']->get('Delete and replace'));
}
开发者ID:narareddy,项目名称:phplist3,代码行数:15,代码来源:editattributes.php
示例8: giveAlternative
function giveAlternative($table, $delete, $attributeid)
{
print "Alternatively you can replace all values with another one:" . formStart();
print '<select name=replace><option value="0">-- Replace with</option>';
$req = Sql_Query("select * from {$table} order by listorder,name");
while ($row = Sql_Fetch_array($req)) {
if ($row[id] != $delete) {
printf('<option value="%d">%s</option>', $row[id], $row[name]);
}
}
print "</select>";
printf('<input type=hidden name="delete" value="%d">', $delete);
printf('<input type=hidden name="id" value="%d">', $attributeid);
print '<input type=submit name="action" value="Delete and Replace"></form>';
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:15,代码来源:editattributes.php
示例9: Redirect
Redirect('list');
}
if (!empty($id)) {
$result = Sql_Query("SELECT * FROM " . $GLOBALS['tables']['list'] . " where id = {$id}");
$list = Sql_Fetch_Array($result);
} else {
$list = array('name' => '', 'active' => 0, 'listorder' => 0, 'description' => '');
}
if (empty($list['category'])) {
$list['category'] = '';
}
@ob_end_flush();
?>
<?php
echo formStart(' class="editlistSave" ');
?>
<input type="hidden" name="id" value="<?php
echo $id;
?>
" />
<div class="label"><label for="listname"><?php
echo $GLOBALS['I18N']->get('List name');
?>
:</label></div>
<div class="field"><input type="text" name="listname" value="<?php
echo htmlspecialchars(stripslashes($list["name"]));
?>
" /></div>
<div class="field"><input type="checkbox" name="active" value="1"
开发者ID:narareddy,项目名称:phplist3,代码行数:31,代码来源:editlist.php
示例10: sprintf
$query = sprintf('insert into %s (email,entered,confirmed) values("testuser%s",now(),1)', $tables['user'], $prefix . '-' . $i . '@' . $domain);
$result = Sql_query($query, 0);
$userid = Sql_insert_id();
if ($userid) {
$result = Sql_query("replace into {$tables['listuser']} (userid,listid,entered) values({$userid},{$listid},now())");
reset($data);
while (list($key, $val) = each($data)) {
if ($key && $val) {
Sql_query("replace into {$tables['user_attribute']} (attributeid,userid,value) values(" . $key . ",{$userid}," . $val . ')');
}
}
}
}
return 1;
}
print formStart(' class="testOutput" ') . '<input type="text" name="output" size=45></form>';
print '<p class="button">' . PageLink2('stresstest', 'Erase Test information', 'eraseall=yes') . ' (may take a while)';
ob_end_flush();
flush();
$testlists = array();
$res = Sql_Query("select id from {$tables['list']} where name like \"%test%\"");
while ($row = Sql_Fetch_Row($res)) {
array_push($testlists, $row[0]);
}
if (!ini_get('safe_mode')) {
if (!count($testlists)) {
print '<script language="Javascript" type="text/javascript"> document.forms[0].output.value="Error: cannot find any test lists to use";</script>' . "\n";
} elseif (!isset($eraseall)) {
print '<script language="Javascript" type="text/javascript"> document.forms[0].output.value="Filling ";</script>' . "\n";
for ($i = 0; $i <= 100; ++$i) {
set_time_limit(60);
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:stresstest.php
示例11: formStart
#}
if (!empty($_GET['tab'])) {
$tabs->setCurrent($_GET['tab']);
} else {
$_GET['tab'] = 'sent';
$tabs->setCurrent('sent');
}
print '<div class="minitabs">';
print $tabs->display();
print '</div>';
$filterDisplay = $_SESSION['messagefilter'];
if ($filterDisplay == '') {
$filterDisplay = ' --- filter --- ';
}
print '<div id="messagefilter" class="filterdiv fright">';
print formStart(' id="messagefilterform" ');
print '<div><input type="text" name="filter" value="' . htmlspecialchars($filterDisplay) . '" id="filtertext" />';
print '<select name="numPP" class="numppOptions">';
foreach (array(5, 10, 15, 20, 50, 100) as $numppOption) {
if ($numppOption == $_SESSION['messagenumpp']) {
print '<option selected="selected">' . $numppOption . '</option>';
} else {
print '<option>' . $numppOption . '</option>';
}
}
print '</select>';
print '<select name="sortBy" class="sortby">';
foreach ($messageSortOptions as $sortOption => $sortOptionLabel) {
if ($sortOption == $_SESSION['messagesortby']) {
print '<option selected="selected" value="' . $sortOption . '">' . $sortOptionLabel . '</option>';
} else {
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:messages.php
示例12: array
$data = array();
$data["title"] = '';
$data["template"] = '';
}
?>
<p class="information"><?php
echo $msg;
?>
</p>
<?php
echo '<p class="button">' . PageLink2("templates", $GLOBALS['I18N']->get('List of Templates')) . '</p>';
?>
<?php
echo formStart(' enctype="multipart/form-data" class="template2" ');
?>
<input type="hidden" name="id" value="<?php
echo $id;
?>
" />
<div class="panel">
<table class="templateForm">
<tr>
<td><?php
echo $GLOBALS['I18N']->get('Title of this template');
?>
</td>
<td><input type="text" name="title" value="<?php
echo stripslashes(htmlspecialchars($data["title"]));
开发者ID:narareddy,项目名称:phplist3,代码行数:31,代码来源:template.php
示例13: dirname
require_once dirname(__FILE__) . '/accesscheck.php';
$access = accessLevel('list');
switch ($access) {
case 'owner':
$subselect = ' where owner = ' . $_SESSION['logindetails']['id'];
break;
case 'all':
$subselect = '';
break;
case 'none':
default:
$subselect = ' where id = 0';
break;
}
print formStart('name="categoryedit"');
if (!isset($_GET['show']) || $_GET['show'] != 'all') {
if (!empty($subselect)) {
$subselect .= ' and ';
} else {
$subselect .= ' where ';
}
$subselect .= '(category is null or category = "")';
} else {
$subselect = 'where true ';
}
$categories = listCategories();
if (!count($categories)) {
## try to fetch them from existing lists
$req = Sql_Query(sprintf('select distinct category from %s where category != "" ', $tables['list']));
while ($row = Sql_Fetch_Row($req)) {
开发者ID:MarcelvC,项目名称:phplist3,代码行数:30,代码来源:catlists.php
示例14: array
}
if (empty($details['type'])) {
$details['type'] = 'undefined';
}
if (!isset($configCategories[strtolower($details['category'])])) {
$configCategories[strtolower($details['category'])] = array();
}
if (!isset($configTypes[$details['type']])) {
$configTypes[$details['type']] = array();
}
$configTypes[$details['type']][] = $item;
$configCategories[strtolower($details['category'])][] = $item;
}
#var_dump($configCategories);
#var_dump($configTypes);
print formStart(' class="configForm" enctype="multipart/form-data" ');
# configure options
reset($default_config);
if (!empty($_REQUEST['save'])) {
if (!verifyToken()) {
print Error(s('Invalid security token, please reload the page and try again'));
return;
}
$info = $default_config[$id];
$haserror = 0;
if (is_array($_POST['values'])) {
foreach ($_POST['values'] as $id => $value) {
if (isset($default_config[$id])) {
$info = $default_config[$id];
if ($id == 'website' || $id == 'domain') {
$value = str_replace('[DOMAIN]', '', $value);
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:configure.php
示例15: subscribePage
//.........这里部分代码省略.........
if (! compareEmail()) {
alert("' . str_replace('"', '\\"', $GLOBALS['strEmailsNoMatch']) . '");
return false;
}';
}
$html .= '
if (! checkEmail()) {
alert("' . str_replace('"', '\\"', $GLOBALS['strEmailNotValid']) . '");
return false;
}';
$html .= '
return true;
}
var fieldstocheck = new Array();
var fieldnames = new Array();
function addFieldToCheck(value,name)
{
fieldstocheck[fieldstocheck.length] = value;
fieldnames[fieldnames.length] = name;
}
var groupstocheck = new Array();
var groupnames = new Array();
function addGroupToCheck(value,name)
{
groupstocheck[groupstocheck.length] = value;
groupnames[groupnames.length] = name;
}
function compareEmail()
{
return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);
}
function checkEmail()
{
var re = /^(([^<>()[\\]\\.,;:\\s@\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\"]+)*)|(\\".+\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;
return re.test(document.subscribeform.elements["email"].value);
}
function checkGroup(name,value)
{
option = -1;
for (i=0;i<document.subscribeform.elements[name].length;i++) {
if (document.subscribeform.elements[name][i].checked) {
option = i;
}
}
if (option == -1) {
alert ("' . $GLOBALS['strPleaseEnter'] . ' "+value);
return false;
}
return true;
}
</script>';
$html .= formStart('name="subscribeform"');
# @@@ update
if (isset($_SESSION['adminloggedin']) && $_SESSION['adminloggedin']) {
$html .= '<div class="adminmessage"><p><b>' . s('You are logged in as administrator (%s) of this phpList system', $_SESSION['logindetails']['adminname']) . '</b></p>';
$html .= '<p>' . s('You are therefore offered the following choice, which your subscribers will not see when they load this page.') . '</p>';
$html .= '<p><a href="' . $GLOBALS['adminpages'] . '" class="button">' . s('Go back to admin area') . '</a></p>';
$html .= '<p><b>' . s('Please choose') . '</b>: <br/><input type=radio name="makeconfirmed" value="1"> ' . s('Make this subscriber confirmed immediately') . '
<br/><input type=radio name="makeconfirmed" value="0" checked> ' . s('Send this subscriber a request for confirmation email') . ' </p></div>';
}
$html .= '<table border=0>';
$html .= ListAttributes($attributes, $attributedata, $GLOBALS['pagedata']['htmlchoice'], 0, $GLOBALS['pagedata']['emaildoubleentry']);
$html .= '</table>';
//obsolete, moved to rssmanager plugin
// if (ENABLE_RSS) { // replaced bij display
// $html .= rssOptions($data);
// }
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
# dbg($plugin->name);
if ($plugin->enabled) {
$html .= $plugin->displaySubscriptionChoice($GLOBALS['pagedata']);
}
}
$html .= ListAvailableLists('', $GLOBALS['pagedata']['lists']);
if (empty($GLOBALS['pagedata']['button'])) {
$GLOBALS['pagedata']['button'] = $GLOBALS['strSubmit'];
}
if (USE_SPAM_BLOCK) {
$html .= '<div style="display:none"><input type="text" name="VerificationCodeX" value="" size="20"></div>';
}
$html .= '<p><input type=submit name="subscribe" value="' . $GLOBALS['pagedata']['button'] . '" onClick="return checkform();"></p></form>';
$html .= '<br/><br/>';
if (SHOW_UNSUBSCRIBELINK) {
$html .= '<p><a href="' . getConfig('unsubscribeurl') . '&id=' . $id . '">' . $GLOBALS['strUnsubscribe'] . '</a></p>';
}
$html .= $GLOBALS['PoweredBy'];
$html .= $GLOBALS['pagedata']['footer'];
unset($_SESSION['subscriberConfirmed']);
return $html;
}
开发者ID:gillima,项目名称:phplist3,代码行数:101,代码来源:index.php
示例16: dirname
<?php
require_once dirname(__FILE__) . '/accesscheck.php';
print formStart('class="listListing"');
$some = 0;
if (isset($_GET['s'])) {
$s = sprintf('%d', $_GET['s']);
} else {
$s = 0;
}
$baseurl = './?page=list';
$actionresult = '';
if (isset($_POST['listorder']) && is_array($_POST['listorder'])) {
while (list($key, $val) = each($_POST['listorder'])) {
$active = empty($_POST['active'][$key]) ? '0' : '1';
$active = $active || listUsedInSubscribePage($key);
$query = ' update %s' . ' set listorder = ?, active = ?' . ' where id = ?';
$query = sprintf($query, $tables['list']);
Sql_Query_Params($query, array($val, $active, $key));
}
}
$access = accessLevel('list');
switch ($access) {
case 'owner':
$subselect = ' where owner = ' . $_SESSION['logindetails']['id'];
$subselect_and = ' and owner = ' . $_SESSION['logindetails']['id'];
break;
case 'all':
$subselect = '';
$subselect_and = '';
break;
开发者ID:juvenal,项目名称:PHPlist,代码行数:31,代码来源:list.php
示例17: if
if (!ereg("#",$buffer)) {
if (!$header)
$header = $buffer;
else if (trim($buffer) != "")
Sql_Query(sprintf('insert into %slistattr_%s (name) values("%s")',$table_prefix,$lc_name,trim($buffer)));
}
}
fclose ($fp);
}
print "Done<br/><br/>";
print '<p>'.PageLink2("attributes","Continue").'</p>';
} else {
?>
<?php
echo formStart();
?>
<?
reset($attributes);
while (list($key,$attribute) = each ($attributes)) {
list($name,$desc) = explode(":",$key);
printf('<input type=checkbox name="selected[]" value="%s">%s<br>', $attribute,$desc);
}
print "<input type=submit value=Add></form>";
}
?>
开发者ID:radicaldesigns,项目名称:amp,代码行数:30,代码来源:defaults.php
示例18: haschanged
return true;
}
// detection of unsaved changes,
var browser = navigator.appName.substring ( 0, 9 );
var changed = 0; function haschanged() {changed = 1; }
function savechanges() { if (changed) { if (confirm("<?php
echo str_replace('"', '"', reverse_htmlentities($GLOBALS['I18N']->get("unsavedchanges")));
?>
")) return true; else return false; return false;}}
//'
var event_number = 0;if (browser=="Microsoft") { document.onkeydown=haschanged; document.onchange=haschanged;} else if (browser=="Netscape") { document.captureEvents(Event.KEYDOWN); document.captureEvents(Event.CHANGE); document.onkeydown=haschanged;document.onchange=haschanged;}
function submitform() { document.sendmessageform.submit() }
</script>
<?php
print formStart($enctype . ' name="sendmessageform"');
#print '<form method="post" enctype="multipart/form-data" name="sendmessageform" onSubmit="return checkForm()">';
print '<input type=hidden name="workaround_fck_bug" value="1">';
if ($_GET["page"] == "preparemessage") {
print Help("preparemessage", $GLOBALS['I18N']->get("whatisprepare"));
}
if (!defined("IN_WEBBLER")) {
if (!$from && is_object($GLOBALS["admin_auth"]) && $GLOBALS['require_login']) {
$adminemail = $GLOBALS["admin_auth"]->adminEmail($_SESSION["logindetails"]["id"]);
if ($adminemail && USE_ADMIN_DETAILS_FOR_MESSAGES) {
$from = $GLOBALS["admin_auth"]->adminName($_SESSION["logindetails"]["id"]) . ' ' . $adminemail;
} else {
$from = getConfig("message_from_name") . ' ' . getConfig("message_from_address");
}
}
}
开发者ID:kvervo,项目名称:phplist-aiesec,代码行数:31,代码来源:send_core.php
示例19: Sql_query
$limit = "limit {$start}," . MAX_USER_PP;
} else {
$limit = 'limit 0,50';
$start = 0;
}
}
if ($find) {
$result = Sql_query('SELECT id,loginname,email FROM ' . $tables['admin'] . ' where loginname like "%' . sql_escape($find) . '%" or email like "%' . sql_escape($find) . "%\" order by loginname {$limit}");
} else {
$result = Sql_query('SELECT id,loginname,email FROM ' . $tables['admin'] . " order by loginname {$limit}");
}
?>
<table>
<tr>
<td colspan=4><?php
echo formStart('action=""');
?>
<input type="hidden" name="id" value="<?php
echo $listid;
?>
">
<?php
echo $GLOBALS['I18N']->get('Find an admin');
?>
: <input type=text name="find"
value="<?php
echo htmlspecialchars($find);
?>
"
size="40"><input type="submit"
value="<?php
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:admins.php
示例20: s
if (pluginCanEnable($pluginname)) {
$ls->addColumn($pluginname, s('enabled'), $plugin->enabled ? PageLinkAjax('plugins&disable=' . $pluginname, $GLOBALS['img_tick']) : PageLinkAjax('plugins&enable=' . $pluginname, $GLOBALS['img_cross']));
}
if (DEVVERSION) {
//$ls->addColumn($pluginname,s('initialise'),$plugin->enabled ?
//PageLinkAjax('plugins&initialise='.$pluginname,s('Initialise')) : '');
if ($plugin->enabled) {
$details .= '<div class="detail"><span class="label">' . s('initialise') . '</span>';
$details .= '<span class="value">';
$details .= PageLinkAjax('plugins&initialise=' . $pluginname, s('Initialise'));
$details .= '</span></div>';
}
}
if (!empty($pluginDetails['installUrl']) && is_writable($pluginDestination . '/' . $pluginname)) {
## we can only delete the ones that were installed from the interface
$ls->addColumn($pluginname, s('delete'), '<span class="delete"><a href="javascript:deleteRec(\'./?page=plugins&delete=' . $pluginname . '\');" class="button" title="' . s('delete this plugin') . '">' . s('delete') . '</a></span>');
}
if (!pluginCanEnable($pluginname)) {
$details .= '<div class="detail"><span class="label">' . s('Dependency check') . '</span>';
$details .= '<span class="value">' . s('Plugin can not be enabled, because it fails a dependency check - ') . $plugin->dependencyFailure . '</span></div>';
}
if (!empty($pluginDetails['installUrl']) && class_exists('ZipArchive')) {
$updateForm = formStart();
$updateForm .= '<input type="hidden" name="pluginurl" value="' . $pluginDetails['installUrl'] . '"/>
<button type="submit" name="update" title="' . s('update this plugin') . '">' . s('update') . '</button></form>';
$ls->addColumn($pluginname, s('update'), $updateForm);
}
$details .= '</div>';
$ls->addRow($pluginname, s('details'), $details);
}
print $ls->display();
开发者ID:Gerberus,项目名称:phplist3,代码行数:31,代码来源:plugins.php
注:本文中的formStart函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论