本文整理汇总了PHP中BizSystem::clientProxy方法的典型用法代码示例。如果您正苦于以下问题:PHP BizSystem::clientProxy方法的具体用法?PHP BizSystem::clientProxy怎么用?PHP BizSystem::clientProxy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BizSystem
的用法示例。
在下文中一共展示了BizSystem::clientProxy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: searchSipTrace
public function searchSipTrace($id = null)
{
include_once OPENBIZ_BIN . "/easy/SearchHelper.php";
$searchRule = "";
foreach ($this->m_DataPanel as $element) {
if (!$element->m_FieldName) {
continue;
}
$value = BizSystem::clientProxy()->getFormInputs($element->m_Name);
if ($element->m_FuzzySearch == "Y") {
$value = "*{$value}*";
}
if ($value) {
$searchStr = inputValToRule($element->m_FieldName, $value, $this);
if ($searchRule == "") {
$searchRule .= $searchStr;
} else {
$searchRule .= " AND " . $searchStr;
}
}
}
$searchRuleBindValues = QueryStringParam::getBindValues();
$listFormObj = BizSystem::getObject($this->localListForm);
$listFormObj->setSearchRule($searchRule, $searchRuleBindValues);
$listFormObj->rerender();
}
示例2: render
public function render()
{
BizSystem::clientProxy()->includeColorPickerScripts();
if ($this->m_Value != null) {
$value = $this->m_Value;
} else {
$value = $this->getText();
}
$disabledStr = $this->getEnabled() == "N" ? "READONLY=\"true\"" : "";
$style = $this->getStyle();
$func = $this->getFunction();
$func_org = $func;
$formobj = $this->GetFormObj();
if ($formobj->m_Errors[$this->m_Name]) {
$func .= "onchange=\"this.className='{$this->m_cssClass}'\"";
} else {
$func .= "onfocus=\"this.className='{$this->m_cssFocusClass}'\" onblur=\"this.className='{$this->m_cssClass}'\"";
}
$elementName = $this->m_Name;
$elementTrigger = array();
if ($value) {
$default_color = "color: '#{$value}',";
} else {
$default_color = "";
$value = $this->getDefaultValue() ? $this->getDefaultValue() : "";
}
switch (strtolower($this->m_Mode)) {
case "viewonly":
$sHTML .= "<span id=\"colorpreview_{$elementName}\" {$func_org} class=\"colorpicker_preview\" style=\"background-color:#{$value};width:98px;\" ></span>";
$elementTrigger = array();
break;
case "widget":
$config = " \n\t\t\t\t\t\t\tonShow: function (colpkr) {\n\t\t\t\t\t\t\t\tif(\$j(colpkr).css('display')=='none'){\n\t\t\t\t\t\t\t\t\t\$j(colpkr).fadeIn(300);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonHide: function (colpkr) {\n\t\t\t\t\t\t\t\t\$j(colpkr).fadeOut(300);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t},\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tonSubmit: function(hsb, hex, rgb, el) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonChange: function (hsb, hex, rgb) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t";
$sHTML .= "<span id=\"colorpreview_{$elementName}\" class=\"colorpicker_preview\" style=\"background-color:#{$value};\" {$func} ></span>";
$sHTML .= "<INPUT NAME=\"" . $this->m_Name . "\" ID=\"" . $this->m_Name . "\" VALUE=\"" . $value . "\" type=\"hidden\" />";
$elementTrigger = array("colorpreview_{$elementName}");
break;
case "flat":
$config = "flat: true,\n\t\t\t\t\t\t\tonSubmit: function(hsb, hex, rgb, el) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonChange: function (hsb, hex, rgb) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t";
$sHTML .= "<span id=\"colorpreview_{$elementName}\" class=\"colorpicker_preview\" style=\"background-color:#{$value};\" ></span>";
$sHTML .= "<INPUT NAME=\"" . $this->m_Name . "\" ID=\"" . $this->m_Name . "\" VALUE=\"" . $value . "\" {$disabledStr} {$this->m_HTMLAttr} {$style} {$func} />";
$sHTML .= "<div id=\"colorpicker_{$elementName}\" style=\"float:left\"></div>";
$elementTrigger = array("colorpicker_" . $elementName);
break;
default:
$config = " \n\t\t\t\t\t\t\tonShow: function (colpkr) {\n\t\t\t\t\t\t\t\tif(\$j(colpkr).css('display')=='none'){\n\t\t\t\t\t\t\t\t\t\$j(colpkr).fadeIn(300);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonHide: function (colpkr) {\n\t\t\t\t\t\t\t\t\$j(colpkr).fadeOut(300);\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t},\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tonSubmit: function(hsb, hex, rgb, el) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonChange: function (hsb, hex, rgb) {\n\t\t\t\t\t\t\t\t\$('{$this->m_Name}').value=hex;\n\t\t\t\t\t\t\t\t\$j('#colorpreview_{$this->m_Name}').css('backgroundColor', '#' + hex);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t";
$sHTML .= "<span id=\"colorpreview_{$elementName}\" class=\"colorpicker_preview\" style=\"background-color:#{$value};\" ></span>";
$sHTML .= "<INPUT NAME=\"" . $this->m_Name . "\" ID=\"" . $this->m_Name . "\" VALUE=\"" . $value . "\" {$disabledStr} {$this->m_HTMLAttr} {$style} {$func} />";
$elementTrigger = array($elementName, "colorpreview_{$elementName}");
break;
}
if ($this->m_Config) {
$config .= "," . $this->m_Config;
}
$config = "{" . $default_color . $config . "}";
foreach ($elementTrigger as $trigger) {
$sHTML .= "<script>\$j('#{$trigger}').ColorPicker({$config});</script>\n";
}
return $sHTML;
}
示例3: render
/**
* Render the chart output
*
* @param string $objName object name which is the bizform name
* @return void
*/
public function render($objName)
{
// get the value of the control that issues the call
$chartName = BizSystem::clientProxy()->getFormInputs("__this");
// get the current UI bizobj
$formObj = BizSystem::getObject($objName);
// get the existing bizform object
$bizDataObj = $formObj->getDataObj();
// get chart config xml file
$chartXmlFile = BizSystem::GetXmlFileWithPath($objName . "_chart");
$xmlArr = BizSystem::getXmlArray($chartXmlFile);
ob_clean();
// get the chart section from config xml file
foreach ($xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"] as $chart) {
if (count($xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"]) == 1) {
$chart = $xmlArr["BIZFORM_CHART"]["CHARTLIST"]["CHART"];
}
// try to match the chartName, if no chartName given, always draw the first chart defined in xml file
if ($chartName && $chart["ATTRIBUTES"]["NAME"] == $chartName || !$chartName) {
if ($chart["ATTRIBUTES"]["GRAPHTYPE"] == 'XY') {
$this->xyGraphRender($bizDataObj, $chart);
break;
}
if ($chart["ATTRIBUTES"]["GRAPHTYPE"] == 'Pie') {
$this->pieGraphRender($bizDataObj, $chart);
break;
}
}
}
}
示例4: GoActive
public function GoActive()
{
$rec = $this->readInputRecord();
$this->setActiveRecord($rec);
if ($rec['eula'] == "0") {
$this->m_Errors = array("fld_eula" => 'You must agree with the license');
$this->m_hasError = true;
BizSystem::clientProxy()->setRPCFlag(true);
return parent::rerender();
}
$appInfo = $this->getAppInfo();
if (!$appInfo) {
$rec['howto_active'] = 'ENTER';
}
switch (strtoupper($rec['howto_active'])) {
case "ENTER":
$this->switchForm("common.form.LicenseActiveForm");
break;
case "FREETRIAL":
if ($this->getTrailLicense()) {
$scriptStr = 'location.reload();';
BizSystem::clientProxy()->runClientFunction($scriptStr);
}
break;
case "PURCHASE":
$url = $appInfo['APP_PURCHASE'];
BizSystem::clientProxy()->redirectPage($url);
break;
case "WEBSITE":
$url = $appInfo['APP_WEBSITE'];
BizSystem::clientProxy()->redirectPage($url);
break;
}
}
示例5: renderSmarty
/**
* Render smarty template for form object
*
* @param EasyForm $formObj
* @param string $tplFile
* @return string result of rendering process
*/
protected static function renderSmarty($formObj, $tplFile)
{
$smarty = BizSystem::getSmartyTemplate();
$smarty->assign("formname", $formObj->m_Name);
$smarty->assign("module", $formObj->getModuleName($formObj->m_Name));
$smarty->assign("title", $formObj->m_Title);
$smarty->assign("errors", $formObj->m_Errors);
$smarty->assign("notices", $formObj->m_Notices);
// if the $formobj form type is list render table, otherwise render record
if ($formObj->m_FormType == 'LIST') {
$recordSet = $formObj->fetchDataSet();
$smarty->assign("dataPanel", $formObj->m_DataPanel->renderTable($recordSet));
} else {
$record = $formObj->fetchData();
$smarty->assign("dataPanel", $formObj->m_DataPanel->renderRecord($record));
}
// render the formobj attributes
$smarty->assign("form", $formObj->outputAttrs());
$smarty->assign("actionPanel", $formObj->m_ActionPanel->render());
$smarty->assign("navPanel", $formObj->m_NavPanel->render());
if (isset($formObj->m_SearchPanel)) {
foreach ($formObj->m_SearchPanel as $elem) {
if (!$elem->m_FieldName) {
continue;
}
$search_record[$elem->m_FieldName] = BizSystem::clientProxy()->getFormInputs($elem->m_Name);
}
$smarty->assign("searchPanel", $formObj->m_SearchPanel->renderRecord($search_record));
}
return $smarty->fetch($tplFile);
}
示例6: getFromList
public function getFromList(&$list)
{
$current_locale = I18n::getInstance()->getCurrentLanguage();
$country = BizSystem::clientProxy()->getFormInputs("fld_region");
$country = strtoupper($country);
if (!$country) {
$locale = explode('_', $current_locale);
$country = strtoupper($locale[0]);
}
require_once 'Zend/Locale.php';
$locale = new Zend_Locale($current_locale);
$code2name = $locale->getTranslationList('territorytolanguage', $locale);
$list = array();
$i = 0;
foreach ($code2name as $key => $value) {
if (preg_match('/' . $country . '/', $value) || strtoupper($key) == $country) {
$lang_list = explode(" ", $value);
foreach ($lang_list as $lang) {
$list[$i]['txt'] = strtolower($key) . "_" . strtoupper($lang);
$list[$i]['val'] = strtolower($key) . "_" . strtoupper($lang);
$i++;
}
}
}
return $list;
}
示例7: _doInsert
/**
* Do insert record
*
* @param array $inputRecord
* @return void
*/
protected function _doInsert($inputRecord)
{
$dataRec = new DataRecord(null, $this->getDataObj());
// $inputRecord['Id'] = null; // comment it out for name PK case
foreach ($inputRecord as $k => $v) {
$dataRec[$k] = $v;
}
// or $dataRec->$k = $v;
try {
$dataRec->save();
} catch (ValidationException $e) {
$errElements = $this->getErrorElements($e->m_Errors);
if (count($e->m_Errors) == count($errElements)) {
$this->formHelper->processFormObjError($errElements);
} else {
$errmsg = implode("<br />", $e->m_Errors);
BizSystem::clientProxy()->showErrorMessage($errmsg);
}
return;
} catch (BDOException $e) {
$this->processBDOException($e);
return;
}
$this->m_ActiveRecord = null;
$this->getActiveRecord($dataRec["Id"]);
//$this->runEventLog();
return $dataRec["Id"];
}
示例8: render
/**
* Render element, according to the mode
*
* @return string HTML text
*/
public function render()
{
BizSystem::clientProxy()->includeCKEditorScripts();
$elementName = $this->m_Name;
$value = $this->getValue();
$value = htmlentities($value, ENT_QUOTES, "UTF-8");
$style = $this->getStyle();
$width = $this->m_Width ? $this->m_Width : 600;
$height = $this->m_Height ? $this->m_Height : 300;
//$func = "onclick=\"editRichText('$elementName', $width, $height);\"";
if (!strlen($value) > 0) {
// fix suggested by smarques
$value = " ";
}
$type = strtolower($this->m_Mode);
$fileBrowserPage = APP_URL . "/bin/filebrowser/browser.html";
$languageCode = I18n::getCurrentLangCode();
$languageCode = str_replace("_", "-", $languageCode);
$config = $this->m_Config;
$sHTML .= "<textarea id=\"{$elementName}\" name=\"{$elementName}\" >{$value}</textarea>\n";
$sHTML .= "<script type=\"text/javascript\">\n";
if ($config) {
//remove the last commas
$config = trim($config);
if (substr($config, strlen($config) - 1, 1) == ',') {
$config = substr($config, strlen($config) - 1);
}
$sHTML .= "Openbiz.CKEditor.init('{$elementName}',{'type':'{$type}','filebrowserBrowseUrl':'{$fileBrowserPage}','language':'{$languageCode}','height':'{$height}','width':'{$width}',{$config}});\n";
} else {
$sHTML .= "Openbiz.CKEditor.init('{$elementName}',{'type':'{$type}','filebrowserBrowseUrl':'{$fileBrowserPage}','language':'{$languageCode}','height':'{$height}','width':'{$width}'});\n";
}
$sHTML .= "</script>\n";
return $sHTML;
}
示例9: setValue
/**
* Set value of element
*
* @param mixed $value
* @return string
*/
function setValue($value)
{
if ($this->m_Deleteable == 'N') {
} else {
$delete_user_opt = BizSystem::clientProxy()->getFormInputs($this->m_Name . "_DELETE");
if ($delete_user_opt) {
$this->m_Value = "";
return;
} else {
if (count($_FILES) > 0) {
} else {
$this->m_Value = $value;
}
}
}
if (count($_FILES) > 0) {
if (!$this->m_Uploaded) {
$file = $_FILES[$this->m_Name];
if (!is_dir($this->m_UploadRoot . $this->m_UploadFolder)) {
mkdir($this->m_UploadRoot . $this->m_UploadFolder, 0777, true);
}
$uploadFile = $this->m_UploadFolder . "/" . date("YmdHis") . "-" . urlencode($file['name']);
if (move_uploaded_file($file['tmp_name'], $this->m_UploadRoot . $uploadFile)) {
$this->m_Value = $this->m_UploadRootURL . $uploadFile;
$this->m_Uploaded = true;
}
return $uploadFile;
}
}
}
示例10: __construct
/**
* Initialize HTMLMenus with xml array
*
* @param array $xmlArr
* @return void
*/
function __construct(&$xmlArr)
{
$this->readMetadata($xmlArr);
BizSystem::clientProxy()->appendStyles("menu", "menu.css");
BizSystem::clientProxy()->appendScripts("menu-ie-js", '<!--[if gte IE 5.5]>
<script language="JavaScript" src="".Resource::getJsUrl()."/ie_menu.js" type="text/JavaScript"></script>
<![endif]-->', false);
}
示例11: allowAccess
public function allowAccess($access = null)
{
if ($this->isNeedInitialize()) {
BizSystem::sessionContext()->setVar("_GROUP_INITIALIZE_LASTVIEW", $_SERVER['REQUEST_URI']);
BizSystem::clientProxy()->redirectPage(APP_INDEX . '/system/initialize_group');
}
return parent::allowAccess($access);
}
示例12: render
public function render()
{
$this->getUrlParameters();
if (empty($this->m_RecordId)) {
BizSystem::clientProxy()->showClientAlert($this->getMessage("PLEASE_EDIT_A_RECORD"));
return;
}
return parent::render();
}
示例13: render
/**
* Render / draw the element according to the mode
*
* @return string HTML text
*/
public function render()
{
BizSystem::clientProxy()->includeCalendarScripts();
$format = $this->m_DateFormat ? $this->m_DateFormat : "%Y-%m-%d";
$sHTML = parent::render();
$showTime = 'false';
//$image = "<img src=\"".Resource::getImageUrl()."/calendar.gif\" border=0 title=\"Select date...\" align='top' hspace='2'>";
$sHTML .= "<a class=\"date_picker\" href=\"javascript: void(0);\" onclick=\"return showCalendar('{$this->m_Name}','{$format}',{$showTime},true);\"></a>";
return $sHTML;
}
示例14: render
/**
* Render / draw the element according to the mode
*
* @return string HTML text
*/
public function render()
{
BizSystem::clientProxy()->includeCalendarScripts();
$format = $this->m_DateFormat ? $this->m_DateFormat : "%Y-%m-%d %H:%M:%S";
$sHTML = parent::render();
$showTime = "'24'";
//$image = "<img src=\"".Resource::getImageUrl()."/calendar.gif\" border=0 title=\"Select date...\" align='top' hspace='2'>";
$sHTML .= "<a title=\"Select date...\" class=\"date_picker\" href=\"javascript: void(0);\" onclick=\"return showCalendar('" . $this->m_Name . "', '" . $format . "', " . $showTime . ", true); return false;\" onmousemove='window.status=\"Select a datetime\"' onmouseout='window.status=\"\"'></a>";
return $sHTML;
}
示例15: renderSmarty
/**
* Render smarty template for view object
*
* @param EasyView $viewObj
* @param string $tplFile
* @return string result of rendering process
*/
protected static function renderSmarty($viewObj, $tplFile)
{
$smarty = BizSystem::getSmartyTemplate();
$newClntObjs = '';
// render the viewobj attributes
$smarty->assign("view", $viewObj->outputAttrs());
$smarty->assign("module", $viewObj->getModuleName($viewObj->m_Name));
if ($viewObj->m_Tiles) {
foreach ($viewObj->m_Tiles as $tname => $tile) {
foreach ($tile as $formRef) {
if ($formRef->m_Display == false) {
continue;
}
$tiles[$tname][$formRef->m_Name] = BizSystem::getObject($formRef->m_Name)->render();
$tiletabs[$tname][$formRef->m_Name] = $formRef->m_Description;
}
}
} else {
foreach ($viewObj->m_FormRefs as $formRef) {
if ($formRef->m_Display == false) {
continue;
}
$forms[$formRef->m_Name] = BizSystem::getObject($formRef->m_Name)->render();
$formtabs[$formRef->m_Name] = $formRef->m_Description;
}
}
// add clientProxy scripts
$includedScripts = BizSystem::clientProxy()->getAppendedScripts();
$styles = BizSystem::clientProxy()->getAppendedStyles();
if ($viewObj->m_IsPopup && $bReRender == false) {
$moveToCenter = "moveToCenter(self, " . $viewObj->m_Width . ", " . $viewObj->m_Height . ");";
$scripts = $includedScripts . "\n<script>\n" . $newClntObjs . $moveToCenter . "</script>\n";
} else {
$scripts = $includedScripts . "\n<script>\n" . $newClntObjs . "</script>\n";
}
if ($viewObj->m_Title) {
$title = Expression::evaluateExpression($viewObj->m_Title, $viewObj);
} else {
$title = $viewObj->m_Description;
}
$smarty->assign("scripts", $scripts);
$smarty->assign("style_sheets", $styles);
$smarty->assign("title", $title);
$smarty->assign("description", $viewObj->m_Description);
$smarty->assign("keywords", $viewObj->m_Keywords);
$smarty->assign("forms", $forms);
$smarty->assign("formtabs", $formtabs);
$smarty->assign("tiles", $tiles);
$smarty->assign("tiletabs", $tiletabs);
if ($viewObj->m_ConsoleOutput) {
$smarty->display(BizSystem::getTplFileWithPath($viewObj->m_TemplateFile, $viewObj->m_Package));
} else {
return $smarty->fetch(BizSystem::getTplFileWithPath($viewObj->m_TemplateFile, $viewObj->m_Package));
}
}