本文整理汇总了PHP中UploadFile::formField方法的典型用法代码示例。如果您正苦于以下问题:PHP UploadFile::formField方法的具体用法?PHP UploadFile::formField怎么用?PHP UploadFile::formField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UploadFile
的用法示例。
在下文中一共展示了UploadFile::formField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UploadFile
echo "<td class='bartop' align='left'>";
echo "<form action='".$php_self."?action=mkfile' method='post'>";
echo "NewFile "."<input name='new_filename' size=30><input type='submit' value='newfile'><input type='hidden' name=workpath value=".$dirpath.">";
echo "</form></td>";
echo "</tr>";
echo "</table>";
//Start of file upload....This has been fixed to include all types of files
echo "<table width='100%' border='0' cellspacing='1' cellpadding ='2'>";
echo "<tr><td class='barbottom' colspan = '7'><br />";
echo "<div><b>"._AM_UPLOADFOLD."</b></div>";
DirSelectOption($dirpath, $selected, $urlpath);
$upload = new UploadFile();
echo $upload->formStart("".$php_self."?action=upload");
echo $upload->formMax();
//for($n = 0; $n < $uploads; $n++) {
echo $upload->formField();
echo "<br /><br /><b>"._AM_IMGNAME."</b><br />";
echo "<input type='hidden' name='uploadpath' value=$dirpath>"; // ADDED
echo "<input type='text' name='imgname' id='imgname' value='' size='40' maxlength='40' /><br /><br />";
//}
echo $upload->formSubmit(_AM_UPLOAD);
echo $upload->formEnd();
echo "</table>";
//clearstatcache();
wfsfooter();
xoops_cp_footer();
?>
示例2: editform
//.........这里部分代码省略.........
}
echo "<option value='{$xhour}' {$sel}>{$xhour}</option>";
}
echo "</select>";
echo " : <select name='autoexpmin'>";
if (isset($autoexpmin)) {
$autoexpmin = intval($autoexpmin);
} elseif (isset($expired)) {
$autoexpmin = date('i', $expired);
} else {
$autoexpmin = date('i');
}
for ($xmin = 0; $xmin < 61; $xmin++) {
if ($xmin == $autoexpmin) {
$sel = 'selected="selected"';
} else {
$sel = '';
}
$xxmin = $xmin;
if ($xxmin < 10) {
$xxmin = "0{$xmin}";
}
echo "<option value='{$xmin}' {$sel}>{$xxmin}</option>";
}
echo "</select><br /><br />";
if (isset($this->published) && $this->published == 0 && isset($this->type) && $this->type == "user") {
echo "<div><input type='checkbox' name='approved' value='1' checked='checked'> <b>" . _AM_APPROVE . "</b></div><br />";
}
echo "<br /><div><input type='checkbox' name='nosmiley' value='1'";
if (isset($this->nosmiley) && $this->nosmiley == 1) {
echo " checked='checked'";
}
echo " /> <b>" . _WFS_DISAMILEY . "</b></div>";
echo "<div><input type='checkbox' name='nohtml' value='1'";
if (isset($this->nohtml) && $this->nohtml == 1) {
echo " checked='checked'";
}
echo " /> <b>" . _WFS_DISHTML . "</b><br />";
echo "</div><br />";
if (isset($isedit) && $isedit == 1) {
echo "<input type='checkbox' name='movetotop' value='1'";
if (isset($movetotop) && $movetotop == 1) {
echo " checked='checked'";
}
echo " /> <b>" . _AM_MOVETOTOP . "</b><br />";
}
echo "<br /><div><input type='checkbox' name='justhtml' value='2'";
if (isset($this->htmlpage) && $this->ishtml == '2') {
echo " checked='checked'";
}
echo " />" . _AM_JUSTHTML . "<br /></div>";
echo "<div><input type='checkbox' name='noshowart' value='1'";
if (isset($this->noshowart) && $this->noshowart == 1) {
echo " checked='checked'";
}
echo " /> " . _AM_NOSHOART . "<br />";
echo "</div><br />";
echo "<input type='checkbox' name='offline' value='1'";
if (isset($this->offline) && $this->offline == 1) {
echo " checked='checked'";
}
echo " /> " . _AM_OFFLINE . "<br />";
echo "<br />";
if (!empty($this->articleid)) {
echo "<input type='hidden' name='articleid' value='" . $this->articleid . "' />\n";
}
if (!empty($HTTP_POST_VARS['referer'])) {
echo "<input type='hidden' name='referer' value='" . $HTTP_POST_VARS['referer'] . "' />\n";
} elseif (!empty($HTTP_SERVER_VARS['HTTP_REFERER'])) {
echo "<input type='hidden' name='referer' value='" . $HTTP_SERVER_VARS['HTTP_REFERER'] . "' />\n";
}
echo "<input type='submit' name='op' class='formButton' value='Preview' /> <input type='submit' name='op' class='formButton' value='Save' /> <input type='submit' name='op' class='formButton' value='Clean' />";
echo "</form>";
echo "</td></tr></table>";
if (!empty($this->articleid)) {
echo "<hr />";
$upload = new UploadFile();
echo $upload->formStart("index.php?op=fileup");
echo "<h4>" . _WFS_FILEUPLOAD . "</h4>\n";
echo "" . _WFS_ATTACHFILEACCESS . "<br />";
echo "<br /><b>" . _WFS_ATTACHFILE . "</b><br />";
echo $upload->formMax();
echo $upload->formField();
echo "<br /><br /><b>" . _WFS_FILESHOWNAME . "</b><br />";
echo "<input type='text' name='fileshowname' id='fileshowname' value='";
if (isset($this->fileshowname)) {
echo $this->fileshowname;
}
echo "' size='70' maxlength='80' /><br />";
echo "<br /><b>" . _WFS_FILEDESCRIPT . "</b><br />";
echo "<textarea name='textfiledescript' cols='50' rows='5'></textarea><br />";
echo "<br /><b>" . _WFS_FILETEXT . "</b><br />";
echo "<textarea name='textfilesearch' cols='50' rows='3'></textarea><br />";
echo "<input type='hidden' name='groupid' value='" . $this->groupip . "' />";
echo "<input type='hidden' name='articleid' value='" . $this->articleid . "' />";
echo "<input type='hidden' name='groupid' value= '" . $this->groupid . "' />";
echo $upload->formSubmit(_WFS_UPLOAD);
echo $upload->formEnd();
}
}