本文整理汇总了PHP中postvalue函数的典型用法代码示例。如果您正苦于以下问题:PHP postvalue函数的具体用法?PHP postvalue怎么用?PHP postvalue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了postvalue函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showDBValue
public function showDBValue(&$data, $keylink)
{
if ($this->container->forExport) {
return "LONG BINARY DATA - CANNOT BE DISPLAYED";
}
$value = "";
if (@$data[$this->field] != NULL && $this->container->pageType != PAGE_PRINT) {
$videoId = 'video_' . GoodFieldName(htmlspecialchars($this->field)) . '_';
$videoId .= $this->getContainer()->id . "_";
if ($this->getContainer()->pageType != PAGE_ADD) {
$videoId .= $this->getContainer()->recId;
} else {
$videoId .= postvalue("id");
}
$type = 'video/flv';
$fileName = 'file.flv';
$fileNameF = $this->getContainer()->pSet->getFilenameField($this->field);
if ($fileNameF) {
$fileName = $data[$fileNameF];
if (!$fileName) {
$fileName = 'file.flv';
} else {
$type = getContentTypeByExtension(substr($fileName, strrpos($fileName, '.')));
}
}
$href = "mfhandler.php?filename=" . $fileName . "&table=" . rawurlencode($this->getContainer()->pSet->_table) . "&field=" . rawurlencode($this->field) . "&pageType=" . $this->getContainer()->pageType . $keylink;
if (isMobileIOS()) {
$value = '<video width="' . $this->getContainer()->pSet->getVideoWidth($this->field) . '" height="' . $this->getContainer()->pSet->getVideoHeight($this->field) . '" controls="controls">
<source src="' . $href . '" type="' . $type . '" />
Your browser does not support the video tag.
</video>';
} else {
$vWidth = $this->getContainer()->pSet->getVideoWidth($this->field);
$vHeight = $this->getContainer()->pSet->getVideoHeight($this->field);
if ($vWidth == 0) {
$vWidth = 300;
}
if ($vHeight == 0) {
$vHeight = 200;
}
$value .= '
<div style="width:' . $vWidth . 'px; height:' . $vHeight . 'px;">
<video class="projekktor" width="' . $vWidth . '" height="' . $vHeight . '" id="' . $videoId . '" type="' . $type . '" src="' . $href . '" >
</video></div>';
}
if ($this->pageObject != null) {
$this->pageObject->controlsMap['video'][] = $videoId;
}
} else {
$fileNameF = $this->getContainer()->pSet->getFilenameField($this->field);
if ($fileNameF) {
$fileName = $data[$fileNameF];
if (!$fileName) {
$value = $fileName;
}
}
}
return $value;
}
示例2: setKeys
/**
* Set keys values
*
* @param {array}
*/
function setKeys($keys = array())
{
if (count($keys)) {
$this->keys = $keys;
return;
}
$tKeys = $this->pSet->getTableKeys();
for ($i = 0; $i < count($tKeys); $i++) {
$this->keys[$tKeys[$i]] = postvalue("editid" . ($i + 1));
}
$this->setKeysForJs();
}
示例3: showDBValue
public function showDBValue(&$data, $keylink)
{
$value = "";
if (@$data[$this->field] != NULL && $this->container->pageType != PAGE_PRINT) {
$videoId = 'video_' . GoodFieldName(runner_htmlspecialchars($this->field)) . '_';
$videoId .= $this->getContainer()->id . "_";
if ($this->getContainer()->pageType != PAGE_ADD) {
$videoId .= $this->getContainer()->recId;
} else {
$videoId .= postvalue("id");
}
$type = 'video/mp4';
$fileName = 'file.mp4';
$fileNameF = $this->getContainer()->pSet->getFilenameField($this->field);
if ($fileNameF) {
$fileName = $data[$fileNameF];
if (!$fileName) {
$fileName = 'file.mp4';
} else {
$type = getContentTypeByExtension(substr($fileName, strrpos($fileName, '.')));
}
}
$href = GetTableLink("mfhandler", "", "filename=" . $fileName . "&table=" . rawurlencode($this->getContainer()->pSet->_table) . "&field=" . rawurlencode($this->field) . "&pageType=" . $this->getContainer()->pageType . $keylink);
$vWidth = $this->getContainer()->pSet->getVideoWidth($this->field);
$vHeight = $this->getContainer()->pSet->getVideoHeight($this->field);
if ($vWidth == 0) {
$vWidth = 300;
}
if ($vHeight == 0) {
$vHeight = 200;
}
$value .= '
<div style="width:' . $vWidth . 'px; height:' . $vHeight . 'px;">
<video class="projekktor" width="' . $vWidth . '" height="' . $vHeight . '" id="' . $videoId . '" type="' . $type . '" src="' . $href . '" >
</video></div>';
if ($this->pageObject != null) {
$this->pageObject->controlsMap['video'][] = $videoId;
}
} else {
$fileNameF = $this->getContainer()->pSet->getFilenameField($this->field);
if ($fileNameF) {
$fileName = $data[$fileNameF];
if (!$fileName) {
$value = $fileName;
}
}
}
return $value;
}
示例4: displaySearchControl
public function displaySearchControl()
{
$this->searchControlBuilder = new PanelSearchControl($this->searchControllerId, $this->tName, $this->searchClauseObj, $this);
$defaultValue = $this->pSet->getDefaultValue($this->ctrlField);
$ctrlBlockArr = $this->searchControlBuilder->buildSearchCtrlBlockArr($this->id, $this->ctrlField, 0, '', false, true, $defaultValue, '');
// build array for encode
$resArr = array();
$resArr['control1'] = trim($this->xt->call_func($ctrlBlockArr['searchcontrol']));
$resArr['control2'] = trim($this->xt->call_func($ctrlBlockArr['searchcontrol1']));
$resArr['comboHtml'] = trim($ctrlBlockArr['searchtype']);
$resArr['delButt'] = trim($ctrlBlockArr['delCtrlButt']);
$resArr['delButtId'] = trim($this->searchControlBuilder->getDelButtonId($this->ctrlField, $this->id));
$resArr['divInd'] = trim($this->id);
$resArr['fLabel'] = GetFieldLabel(GoodFieldName($this->tName), GoodFieldName($this->ctrlField));
$resArr['ctrlMap'] = $this->controlsMap['controls'];
if (postvalue('isNeedSettings') == 'true') {
$this->fillSettings();
$resArr['settings'] = $this->jsSettings;
}
// return JSON
echo printJSON($resArr);
exit;
}
示例5: postvalue
*
* Rules:
* 1) All fields are required
* 2) usernm must be unique
* 3) usernm must match usernm2
* 4) passwd must be passwd2
*
*/
case "Register":
$firstnm = postvalue("firstnm", "");
$lastnm = postvalue("lastnm", "");
$phonenbr = postvalue("phonenbr", "");
$usernm = postvalue("usernm", "");
$usernm2 = postvalue("usernm2", "");
$passwd = postvalue("passwd", "");
$passwd2 = postvalue("passwd2", "");
$errlist = "<ul style='background-color: red; padding: 8px 40px 8px 40px;'>";
$errors = 0;
/* Required field checks */
if (!$firstnm) {
$errlist .= "<li>First name is required.</li>";
$errors++;
}
if (!$lastnm) {
$errlist .= "<li>Last name is required.</li>";
$errors++;
}
if (!$phonenbr) {
$errlist .= "<li>Phone number is required.</li>";
$errors++;
}
示例6: postvalue
}
$options["masterKeysReq"][$i] = $_REQUEST["masterkey" . $i];
$i++;
}
// Create $pageObject
$pageObject = ListPage::createListPage($strTableName, $options);
// Read Search parameters from the request
if (postvalue("saveSearch") && postvalue("searchName") && !is_null($pageObject->searchLogger)) {
$searchName = postvalue("searchName");
$searchParams = $pageObject->getSearchParamsForSaving();
$pageObject->searchLogger->saveSearch($searchName, $searchParams);
$pageObject->searchClauseObj->savedSearchIsRun = true;
$_SESSION[$pageObject->sessionPrefix . '_advsearch'] = serialize($pageObject->searchClauseObj);
echo my_json_encode($searchParams);
exit;
}
// Delete the saved search
if (postvalue("deleteSearch") && postvalue("searchName") && !is_null($pageObject->searchLogger)) {
$searchName = postvalue("searchName");
$pageObject->searchLogger->deleteSearch($searchName);
exit;
}
$gQuery->ReplaceFieldsWithDummies($pageObject->getNotListBlobFieldsIndices());
if ($mode != LIST_DETAILS) {
}
unset($_SESSION["message_add"]);
unset($_SESSION["message_edit"]);
// prepare code for build page
$pageObject->prepareForBuildPage();
// show page depends of mode
$pageObject->showPage();
示例7: array
} else {
$xt->assign("footer", false);
$xt->assign("header", false);
$xt->assign("flybody", $pageObject->body);
$xt->assign("body", true);
$xt->assign("pdflink_block", false);
$pageObject->fillSetCntrlMaps();
$returnJSON['controlsMap'] = $pageObject->controlsHTMLMap;
$returnJSON['viewControlsMap'] = $pageObject->viewControlsHTMLMap;
$returnJSON['settings'] = $pageObject->jsSettings;
}
$xt->assign("style_block", true);
$xt->assign("stylefiles_block", true);
$editlink = "";
$editkeys = array();
$editkeys["editid1"] = postvalue("editid1");
foreach ($editkeys as $key => $val) {
if ($editlink) {
$editlink .= "&";
}
$editlink .= $key . "=" . $val;
}
$xt->assign("editlink_attrs", "id=\"editLink" . $id . "\" name=\"editLink" . $id . "\" onclick=\"window.location.href='pad_pad_customer_edit.php?" . $editlink . "'\"");
$strPerm = GetUserPermissions($strTableName);
if (CheckSecurity($ownerIdValue, "Edit") && !$inlineview && strpos($strPerm, "E") !== false) {
$xt->assign("edit_button", true);
} else {
$xt->assign("edit_button", false);
}
if (!$pdf && !$all && !$inlineview) {
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
示例8: my_json_encode
$pageObject->body['end'] .= "window.settings = " . my_json_encode($pageObject->jsSettings) . ";";
$pageObject->body['end'] .= '</script>';
$pageObject->body['end'] .= "<script language=\"JavaScript\" src=\"include/runnerJS/RunnerAll.js\"></script>\r\n";
$pageObject->body["end"] .= "<script>" . $pageObject->PrepareJs() . "</script>";
$xt->assignbyref("body", $pageObject->body);
$xt->display($templatefile);
exit;
} else {
if ($mode == SEARCH_LOAD_CONTROL) {
$searchControlBuilder = new PanelSearchControl($searchControllerId, $strTableName, $pageObject->searchClauseObj, $pageObject);
$ctrlField = postvalue('ctrlField');
$ctrlBlockArr = $searchControlBuilder->buildSearchCtrlBlockArr($id, $ctrlField, 0, '', false, true, '', '');
// build array for encode
$resArr = array();
$resArr['control1'] = trim($xt->call_func($ctrlBlockArr['searchcontrol']));
$resArr['control2'] = trim($xt->call_func($ctrlBlockArr['searchcontrol1']));
$resArr['comboHtml'] = trim($ctrlBlockArr['searchtype']);
$resArr['delButt'] = trim($ctrlBlockArr['delCtrlButt']);
$resArr['delButtId'] = trim($searchControlBuilder->getDelButtonId($ctrlField, $id));
$resArr['divInd'] = trim($id);
$resArr['fLabel'] = GetFieldLabel(GoodFieldName($strTableName), GoodFieldName($ctrlField));
$resArr['ctrlMap'] = $pageObject->controlsMap['controls'];
if (postvalue('isNeedSettings') == 'true') {
$pageObject->fillSettings();
$resArr['settings'] = $pageObject->jsSettings;
}
// return JSON
echo my_json_encode($resArr);
exit;
}
}
示例9: postvalue
$params["tName"] = $strTableName;
$params["action"] = postvalue("a");
$params["needSearchClauseObj"] = false;
$params["baseTableName"] = postvalue("table");
$params["afterAdd_id"] = postvalue("afteradd");
$params["masterTable"] = postvalue("mastertable");
if ($pageMode == ADD_INLINE) {
// Inline add in a 'List page with search' lookup
$params["forListPageWithSearch"] = postvalue('forLookup');
$params["screenWidth"] = postvalue("screenWidth");
$params["screenHeight"] = postvalue("screenHeight");
$params["orientation"] = postvalue("orientation");
$params["masterPageType"] = postvalue("mainMPageType");
}
if ($pageMode == ADD_ONTHEFLY || $pageMode == ADD_INLINE && (postvalue('forLookup') || postvalue("category"))) {
//table where lookup is set
$params["mainTable"] = postvalue("table");
//field with lookup is set
$params["mainField"] = postvalue("field");
//the ptype od the page where lookup is set
$params["mainPageType"] = postvalue("pageType");
//the parent control value
$params["category"] = postvalue("category");
}
if ($pageMode == ADD_DASHBOARD) {
$params["dashElementName"] = postvalue("dashelement");
$params["dashTName"] = postvalue("table");
}
$pageObject = new AddPage($params);
$pageObject->init();
$pageObject->process();
示例10: array
// update_uid -
$viewContainer->recId = $recordsCounter;
$value = $viewContainer->showDBValue("update_uid", $data, $keylink);
$row["update_uid_value"] = $value;
// npwpd_old -
$viewContainer->recId = $recordsCounter;
$value = $viewContainer->showDBValue("npwpd_old", $data, $keylink);
$row["npwpd_old_value"] = $value;
// id_old -
$viewContainer->recId = $recordsCounter;
$value = $viewContainer->showDBValue("id_old", $data, $keylink);
$row["id_old_value"] = $value;
$rowinfo[] = $row;
$data = $cipherer->DecryptFetchedArray($rs);
}
$xt->assign_loopsection("details_row", $rowinfo);
}
$returnJSON = array("success" => true);
$xt->load_template("pad_pad_customer_detailspreview.htm");
$returnJSON["body"] = $xt->fetch_loaded();
if ($mode != "inline") {
$returnJSON["counter"] = postvalue("counter");
$layout = GetPageLayout(GoodFieldName($strTableName), 'detailspreview');
if ($layout) {
$rtl = $xt->getReadingOrder() == 'RTL' ? 'RTL' : '';
$returnJSON["style"] = "styles/" . $layout->style . "/style" . $rtl . ".css";
$returnJSON["pageStyle"] = "pagestyles/" . $layout->name . $rtl . ".css";
$returnJSON["layout"] = $layout->style . " page-" . $layout->name . ".css";
}
}
echo "<textarea>" . htmlspecialchars(my_json_encode($returnJSON)) . "</textarea>";
示例11: db_insertid
}
if (count($aKeys) == 0 && searchId) {
$lastId = db_insertid($conn);
if ($lastId > 0) {
$aKeys[$keyfields[0]] = $lastId;
}
}
}
return $aKeys;
}
$id = postvalue("id") != "" ? postvalue("id") : 1;
$error_message = "";
// if is postback (form sended) and import needed
if (@$_POST["a"] == "added") {
$value = postvalue("value_ImportFileName" . $id);
$type = postvalue("type_ImportFileName" . $id);
$importfile = getImportTableName("file_ImportFileName" . $id);
//check the file extension
$pos = strrpos($value, ".");
$ext = strtoupper(substr($value, $pos));
if ($eventObj->exists('BeforeImport')) {
if ($eventObj->BeforeImport() === false) {
exit(0);
}
}
if ($ext == ".XLS" || $ext == ".XLSX") {
ImportFromExcel($importfile);
} else {
ImportFromCSV($importfile);
}
if ($eventObj->exists('AfterImport')) {
示例12: showPage
public function showPage()
{
if ($this->eventsObject->exists("BeforeShowChart")) {
$this->eventsObject->BeforeShowChart($this->xt, $this->templatefile, $this);
}
if ($this->mode == CHART_DETAILS || $this->mode == CHART_DASHBOARD || $this->mode == CHART_DASHDETAILS) {
$this->addControlsJSAndCSS();
$this->fillSetCntrlMaps();
$this->xt->unassign("header");
$this->xt->unassign("footer");
$this->body["begin"] = "";
$this->body["end"] = "";
$this->xt->assign("body", $this->body);
$bricksExcept = array("chart");
$this->xt->hideAllBricksExcept($bricksExcept);
if ($this->show_message_block) {
$this->xt->assign("message_block", true);
}
$this->displayAJAX($this->templatefile, $this->id + 1);
exit;
}
if ($this->mode == CHART_POPUPDETAILS) {
$bricksExcept = array("grid", "pagination");
$this->xt->unassign('header');
$this->xt->unassign('footer');
$this->body["begin"] = '';
$this->body["end"] = '';
$this->xt->hideAllBricksExcept($bricksExcept);
$this->xt->prepare_template($this->templatefile);
$respArr = array();
$respArr['success'] = true;
$respArr['body'] = $this->xt->fetch_loaded("body");
$respArr['counter'] = postvalue('counter');
$this->xt->assign("container_master", false);
echo printJSON($respArr);
exit;
}
$this->display($this->templatefile);
}
示例13: GetTableByShort
$strTableName = GetTableByShort($table);
if (!checkTableName($table)) {
exit(0);
}
require_once "include/" . $table . "_variables.php";
$searchFor = postvalue('searchFor');
// if nothing to search
if ($searchFor == '') {
echo printJSON(array('success' => true, 'result' => ''));
return;
}
$_connection = $cman->byTable($strTableName);
// array of vals
$response = array();
$searchOpt = postvalue("start") ? "Starts with" : "Contains";
$searchField = GoodFieldName(postvalue('searchField'));
$strSecuritySql = SecuritySQL("Search", $strTableName);
$numberOfSuggests = GetGlobalData("searchSuggestsNumber", 10);
$pSet = new ProjectSettings($strTableName, PAGE_SEARCH);
if ($searchField == "") {
$allSearchFields = $pSet->getGoogleLikeFields();
} else {
// array of fields which were added in wizard for search
$allSearchFields = $pSet->getAllSearchFields();
}
require_once getabspath('classes/controls/EditControlsContainer.php');
$detailKeys = array();
$masterWhere = "";
$cipherer = new RunnerCipherer($strTableName);
$controls = new EditControlsContainer(null, $pSet, PAGE_LIST, $cipherer);
if (@$_SESSION[$strTableName . "_mastertable"] != "") {
示例14: readWebValue
function readWebValue(&$avalues, &$blobfields, $legacy1, $legacy2, &$filename_values)
{
$this->getPostValueAndType();
$this->formStamp = postvalue("formStamp_" . $this->goodFieldName . "_" . $this->id);
if (FieldSubmitted($this->goodFieldName . "_" . $this->id) && $this->formStamp != "") {
$filesArray = my_json_decode($this->webValue);
if (!is_array($filesArray) || count($filesArray) == 0) {
$this->webValue = "";
} else {
if (count($_SESSION["mupload_" . $this->formStamp]) > 0) {
foreach ($_SESSION["mupload_" . $this->formStamp] as $fileArray) {
$fileArray["deleted"] = true;
}
}
$result = array();
$uploadDir = $this->pageObject->pSetEdit->getLinkPrefix($this->field);
$searchStr = "";
foreach ($filesArray as $file) {
if (isset($_SESSION["mupload_" . $this->formStamp][$file["name"]])) {
$sessionFile = $_SESSION["mupload_" . $this->formStamp][$file["name"]]["file"];
$searchStr .= $file["name"] . ",!";
$result[] = array("name" => $sessionFile["name"], "usrName" => $file["name"], "size" => $sessionFile["size"], "type" => $sessionFile["type"]);
if ($this->pageObject->pSetEdit->getCreateThumbnail($this->field) && $sessionFile["thumbnail"] != "") {
$lastIndex = count($result) - 1;
$result[$lastIndex]["thumbnail"] = $sessionFile["thumbnail"];
$result[$lastIndex]["thumbnail_type"] = $sessionFile["thumbnail_type"];
$result[$lastIndex]["thumbnail_size"] = $sessionFile["thumbnail_size"];
}
$_SESSION["mupload_" . $this->formStamp][$file["name"]]["deleted"] = false;
}
}
if (count($result) > 0) {
$result[0]["searchStr"] = $searchStr . ":sStrEnd";
$this->webValue = my_json_encode_unescaped_unicode($result);
} else {
$this->webValue = "";
}
}
} else {
$this->webValue = false;
}
if (!($this->webValue === false)) {
if ($this->connection->dbType == nDATABASE_Informix) {
if (IsTextType($this->pageObject->pSetEdit->getFieldType($this->field))) {
$blobfields[] = $this->field;
}
}
$avalues[$this->field] = $this->webValue;
}
}
示例15: delete
public function delete()
{
$fileName = postvalue("fileName");
$success = false;
if (isset($_SESSION["mupload_" . $this->formStamp][$fileName])) {
if (!$_SESSION["mupload_" . $this->formStamp][$fileName]["fromDB"]) {
$sessionFile = $_SESSION["mupload_" . $this->formStamp][$fileName]["file"];
$file_path = $sessionFile["name"];
if (is_file($file_path)) {
$success = unlink($file_path);
}
if ($success && $sessionFile["thumbnail"] != "") {
$file = $sessionFile["thumbnail"];
if (is_file($file)) {
unlink($file);
}
}
unset($_SESSION["mupload_" . $this->formStamp][$fileName]);
} else {
$_SESSION["mupload_" . $this->formStamp][$fileName]["deleted"] = true;
$success = true;
}
}
header('Content-type: application/json');
echo my_json_encode($success);
}