本文整理汇总了PHP中FormHandler::hiddenField方法的典型用法代码示例。如果您正苦于以下问题:PHP FormHandler::hiddenField方法的具体用法?PHP FormHandler::hiddenField怎么用?PHP FormHandler::hiddenField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormHandler
的用法示例。
在下文中一共展示了FormHandler::hiddenField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add
//.........这里部分代码省略.........
?>
<script type="text/javascript" src="../js/embed-object.js"></script>
<script language="JavaScript" type="text/JavaScript" src="../js/swfobject.js"></script>
<script language="JavaScript">
function setImage(image){
// document.getElementById('PICTURE').value = image.substr(2,image.length);
}
function setMovie(movie, id){
if (id == 1){
document.getElementById('SOURCE_FILE').value = movie;
}
if (id == 2){
// document.getElementById('SOURCE_FILE2').value = movie;
}
if (id == 3){
// document.getElementById('SOURCE_FILE3').value = movie;
// document.getElementById('SOURCE_FILE2').value = movie.replace("600","2000");
document.getElementById('SOURCE_FILE').value = movie.replace("600","1000");
}
}
function setTrailer(trailer){
// document.getElementById('TRAILER').value = trailer.substr(2,trailer.length);
}
</script>
<?php
if (isset($_GET['id'])) {
echo "<span class=\"pageHeading\">Wijzigen product</span><BR><BR>";
} else {
echo "<span class=\"pageHeading\">Invoeren nieuw product</span><BR><BR>";
}
$form = new FormHandler();
$form->PermitEdit();
$form->TableSettings('100%', 0, 1, 2, 'font-family:Verdana;font-size:10px;border: 1px solid grey');
//$form->AddHTML($myhtml);
// set the database data (data from another file or so ? )
$form->UseDatabase(DB_DATABASE, "products");
$form->textfield("Titel", "TITLE", "", "50");
$form->TextArea("Synopsis algemeen", "SHORT_SYNOPSIS", "", 47);
//$form->textfield("<a href=# onclick=window.open(\"./mftp/index.php?film=1¤tDir=voetbal_supporter\",\"film\",\"width=560,height=350,left=250,top=200\")><U>Film locatie - 1Mbps</U></a>:", "SOURCE_FILE", "", "50");
//$form->textfield("ContentID 1Mbps", "CONTENTID", "", "5");
if ($this->parent->module_exists("categories")) {
$categories = $GLOBALS["categories"]->contents();
$form->SelectField("Categorie", "CATEGORY_ID", $categories, true);
}
//reset
if (isset($_GET['id'])) {
$query = "SELECT source_file, TITLE FROM products WHERE products.product_id = '" . $_GET['id'] . "'";
$exec2 = mysql_query($query);
$row2 = mysql_fetch_array($exec2);
mysql_data_seek($exec2, 0);
$popupHtml = "";
$image_url = "../images/screens/";
$image_name = $row2['source_file'];
$image_name = substr($image_name, 0, strlen($image_name) - 4);
$popupHtml .= "<tr><td colspan=4><table cellspacing=\"2\" cellpadding=\"0\"><tr>";
for ($x = 0; $x < 5; $x++) {
$popupHtml .= "<td height=\"100\" align=\"center\" valign=\"middle\">";
$image = $image_name . "_" . ($x + 1) . ".jpg";
$popupHtml .= "<img src=\"" . $image_url . $image . "\" width=\"100\" border=\"0\">";
$popupHtml .= "</td>";
}
$popupHtml .= "</tr></table></td></tr>";
$sourcefile = "http://217.114.103.140/content/bbaltv/" . $row2['source_file'];
$flash = str_replace(".wmv", ".flv", $row2['source_file']);
$flash_sourcefile = "http://217.114.103.140/content/bbaltv/" . $flash;
$image = "http://www.bbal.tv/images/screens/" . $_GET['id'] . "_2.jpg";
if (file_exists($flash_sourcefile)) {
$popupHtml .= "<tr>";
$popupHtml .= "<td colspan=3 width=\"390\" align=\"left\"><p id=\"flvplayer\"><a href=\"http://www.macromedia.com/go/getflashplayer\">Get the Flash Player</a> to see this player.</p>";
$popupHtml .= "<script type=\"text/javascript\">";
$popupHtml .= "var so = new SWFObject('../flash/flvplayer.swf','player','390','290','7');";
$popupHtml .= "so.addParam(\"allowfullscreen\",\"true\");";
$popupHtml .= "so.addVariable(\"file\",\"" . $flash_sourcefile . "\");";
$popupHtml .= "so.addVariable(\"image\", \"" . $image . "\");";
$popupHtml .= "so.addVariable(\"displayheight\",\"290\");";
$popupHtml .= "so.addVariable(\"lightcolor\",\"0x557722\");";
$popupHtml .= "so.addVariable(\"backcolor\",\"0x363795\");";
$popupHtml .= "so.addVariable(\"frontcolor\",\"0xCCCCCC\");";
$popupHtml .= "so.write('flvplayer');";
$popupHtml .= "</script>";
$popupHtml .= "</td></tr>";
}
$form->AddHTML($popupHtml);
}
if ($this->parent->module_exists("upload")) {
$files = $GLOBALS["upload"]->contents();
array_unshift($files, "");
$form->SelectField("Uploaded file", "UPLOAD_FILE", $files, true);
//print_r($files);
// $form->AddHTML($uploadHtml);
}
if (strpos(" " . $_SERVER['QUERY_STRING'], "opmerking=1")) {
$form->hiddenField("VISIBLE", "T");
}
$form->AddHTML("<tr><td colspan=\"3\"> </td></tr>");
$form->SubmitBtn("Opslaan", false, "Annuleren");
$form->OnSaved("doRun");
// flush the form
$form->FlushForm();
}