本文整理汇总了PHP中loadCoreFile函数的典型用法代码示例。如果您正苦于以下问题:PHP loadCoreFile函数的具体用法?PHP loadCoreFile怎么用?PHP loadCoreFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了loadCoreFile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CR_Rates_Settings
/**
* Constructor
*/
function CR_Rates_Settings()
{
// loading the prototypes of form fields
loadCoreFile('html_form.php');
// initializing the template filler
$this->mTmplFiller = new TmplFiller();
}
示例2: PO_CRulesEditor
function PO_CRulesEditor()
{
global $application;
$this->MessageResources =& $application->getInstance("MessageResources", "product-options-messages", "AdminZone");
$this->NoView = false;
loadCoreFile('html_form.php');
}
示例3: OrderList
function OrderList()
{
global $application;
#check if fatal errors of the block tag exist
$this->NoView = false;
if ($application->issetBlockTagFatalErrors("OrderList")) {
$this->NoView = true;
}
$settings = modApiFunc('Customer_Account', 'getSettings');
if ($settings['CHECKOUT_TYPE'] == CHECKOUT_TYPE_QUICK) {
$this->NoView = true;
}
loadCoreFile('html_form.php');
$this->customer_obj = null;
$this->incoming_filter = null;
$email = modApiFunc('Customer_Account', 'getCurrentSignedCustomer');
if ($email !== null) {
$this->customer_obj =& $application->getInstance('CCustomerInfo', $email);
$request = new Request();
$filter = $request->getValueByKey('filter');
if ($filter != null) {
$orders_search_filter = null;
if ($filter == 'id') {
$orders_search_filter = array('type' => 'id', 'order_status' => ORDER_STATUS_ALL, 'order_id' => intval($request->getValueByKey('order_id')));
} elseif ($filter != 'custom' and defined('ORDER_STATUS_' . _ml_strtoupper($filter))) {
$orders_search_filter = array('type' => 'quick', 'order_status' => constant('ORDER_STATUS_' . _ml_strtoupper($filter)));
} elseif ($filter == 'custom') {
$orders_search_filter = array('type' => 'custom', 'order_status' => $request->getValueByKey('order_status'), 'order_payment_status' => $request->getValueByKey('order_payment_status'), 'day_from' => $request->getValueByKey('day_from'), 'month_from' => $request->getValueByKey('month_from'), 'year_from' => $request->getValueByKey('year_from'), 'day_to' => $request->getValueByKey('day_to'), 'month_to' => $request->getValueByKey('month_to'), 'year_to' => $request->getValueByKey('year_to'));
}
$this->incoming_filter = $orders_search_filter;
$this->customer_obj->setOrdersHistoryFilter($this->incoming_filter);
}
}
}
示例4: LanguageSettings
/**
* Constructor
*/
function LanguageSettings()
{
// initializing the template engine
$this->mTmplFiller = new TmplFiller();
// loading the html patterns
loadCoreFile('html_form.php');
}
示例5: output
/**
*
*/
function output()
{
global $application;
loadCoreFile('html_form.php');
$this->_messageResources =& Subscriptions::getMessageResources();
$this->_tmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/');
$this->_topic_id = modApiFunc('Request', 'getValueByKey', 'topic');
if (!empty($this->_topic_id)) {
$this->_mode = SM_SHOW_TOPIC;
$this->initShowTopic();
if (empty($this->_topic)) {
return $this->_tmplFiller->fill('', 'errors/no_topic_manage.tpl.html', array('Message' => $this->_messageResources->getMessage(new ActionMessage(array('TOPIC_DOESNT_EXISTS', $this->_topic_id)))));
}
} else {
$this->_mode = SM_SHOW_TOPICS_LIST;
$this->topics = modApiFunc('Subscriptions', 'getTopicsList');
}
$this->initFormData();
$this->_templateContents = array('ToolbarTop', 'ToolbarBottom', 'FormErrors', 'ItemsList', 'EmailsPaginator', 'EmailSearchForm', 'LinkResetSearchEmail');
$application->registerAttributes($this->_templateContents);
$request = new Request();
$request->setView(CURRENT_REQUEST_URL);
$vars = array('FormAction' => $request->getURL(), 'AddTopicURL' => $this->urlAddTopic(), 'EditTopicURL' => $this->urlEditTopic(), 'SortTopicsURL' => $this->urlSortTopic(), 'DeleteTopicsURL' => $this->urlDeleteTopics(), 'SubscribeURL' => $this->urlSubscribe(), 'UnsubscribeURL' => $this->urlUnsubscribe(), 'ExportURL' => $this->urlExport());
$result = $this->_tmplFiller->fill('', 'manage.tpl.html', $vars);
return $result;
}
示例6: onAction
/**
*
*/
function onAction()
{
global $application;
loadCoreFile('licensekey.php');
loadCoreFile('licenseaccount.php');
// sending the registration request
$lk = new LicenseKey();
$lac = new LicenseAccountClient();
$response = $lac->requestUpdateLicense(array("LicenseKey" => $lk->getLicenseKey(), "LicenseDomain" => $lk->getLicenseURL(), "LicenseType" => PRODUCT_VERSION_INTERNAL_TYPE));
$result_msg = "UNKNOWN_ERROR";
if ($response['CODE'] == 0 && !empty($response['CERT'])) {
loadCoreFile('licensecert.php');
$lc = new LicenseCertificate();
if ($lc->_save_cert_to_file($response['CERT']) === false) {
// error saving certificate
$result_msg = "CERT_ERROR_CANNOT_SAVE";
} else {
if ($lc->certificate_status === CERTIFICATE_OK) {
// certificate saved successfully
$result_msg = "UPDATE_SUCCESS";
} else {
// invalid certificate received
$result_msg = "CERT_ERROR_INVALID";
}
}
} else {
if (!empty($response['CODE'])) {
// error handling
$result_msg = "RESPONSE_" . $response['CODE'];
}
}
//$request = $application->getInstance('Request');
modApiFunc('Session', 'set', 'ResultMessage', $result_msg);
$this->redirect();
}
示例7: output
function output($mode)
{
global $application;
loadCoreFile('html_form.php');
$this->_prefix = _ml_strtolower($mode);
$this->_Prefix = _ml_strtoupper($mode[0]) . _ml_substr($this->_prefix, 1);
$this->_PREFIX = _ml_strtoupper($mode);
$this->_messageResources =& Subscriptions::getMessageResources();
$this->_tmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/');
$this->initFormData();
$result = '';
//$action = modApiFunc('Request', 'getValueByKey', 'asc_action');
$action = @$this->POST['asc_action'];
$has_errors = sizeof($this->ErrorsArray) > 0;
$stage = modApiFunc('Request', 'getValueByKey', 'stage');
if (empty($stage)) {
$result = $this->outputAskEmails();
} elseif ($stage == 'confirm') {
$result = $this->outputAskConfirmation();
} elseif ($stage == 'finish') {
// @ show errors if were
modApiFunc("application", "closeChild_UpdateParent");
}
return $result;
}
示例8: doInstall
function doInstall()
{
loadCoreFile('obj_xml.php');
$parser = new xml_doc(file_get_contents(NOTIFICATIONS_INSTALL_DATA_XML_FILE));
$parser->parse();
foreach ($parser->xml_index as $tag) {
if ($tag->name == 'NOTIFICATIONS_INSTALL_DATA') {
foreach ($tag->children as $id_child) {
switch ($id_child->name) {
case 'INFOTAGS':
$this->__install_ProcessInfotags($id_child);
break;
case 'BLOCKTAGS':
$this->__install_ProcessBlocktags($id_child);
break;
case 'ACTIONS':
$this->__install_ProcessActions($id_child);
break;
case 'NOTIFICATIONS':
$this->__install_ProcessNotifications($id_child);
break;
}
}
}
}
$this->__install_addEventsHandlers();
return;
}
示例9: OrderSearchForm
function OrderSearchForm()
{
global $application;
#check if fatal errors of the block tag exist
$this->NoView = false;
if ($application->issetBlockTagFatalErrors("OrderSearchForm")) {
$this->NoView = true;
}
$settings = modApiFunc('Customer_Account', 'getSettings');
if ($settings['CHECKOUT_TYPE'] == CHECKOUT_TYPE_QUICK) {
$this->NoView = true;
}
loadCoreFile('html_form.php');
$this->customer_obj = null;
$this->incoming_filter = null;
$email = modApiFunc('Customer_Account', 'getCurrentSignedCustomer');
if ($email !== null) {
$this->customer_obj =& $application->getInstance('CCustomerInfo', $email);
$request = new Request();
$filter = $request->getValueByKey('filter');
if ($filter != null) {
$orders_search_filter = null;
if ($filter == 'custom') {
$orders_search_filter = array('type' => 'custom', 'order_status' => $request->getValueByKey('order_status'), 'order_payment_status' => $request->getValueByKey('order_payment_status'), 'day_from' => $request->getValueByKey('day_from'), 'month_from' => $request->getValueByKey('month_from'), 'year_from' => $request->getValueByKey('year_from'), 'day_to' => $request->getValueByKey('day_to'), 'month_to' => $request->getValueByKey('month_to'), 'year_to' => $request->getValueByKey('year_to'));
}
$this->incoming_filter = $orders_search_filter;
}
}
}
示例10: ManageCustomFields
function ManageCustomFields()
{
global $application;
loadCoreFile('html_form.php');
$this->MessageResources =& $application->getInstance('MessageResources');
$this->TemplateFiller = $application->getInstance('TmplFiller');
$this->HtmlForm = new HtmlForm();
$request = new Request();
$this->mode = isset($_POST["mode"]) ? $_POST["mode"] : $request->getValueByKey("mode");
$this->var_id = isset($_POST["variant_id"]) ? $_POST["variant_id"] : $request->getValueByKey("variant_id");
$this->attr_id = isset($_POST["attribute_id"]) ? $_POST["attribute_id"] : $request->getValueByKey("attribute_id");
$custom_fields_data = modApiFunc("Checkout", 'getPersonCustomAttributes', $this->var_id);
if ($this->attr_id == null && $this->mode != "add") {
if (count($custom_fields_data) != 0) {
$this->attr_id = $custom_fields_data[0]['person_attribute_id'];
}
}
if ($this->mode == null) {
$this->mode = "edit";
}
if (count($custom_fields_data) == 0) {
$this->mode = "add";
}
if ($this->attr_id != null) {
$this->field_data = modAPIFunc("Checkout", "getPersonAttributeData", $this->var_id, $this->attr_id);
}
if (modApiFunc("Session", "is_set", "FormData")) {
$this->field_data['postdata'] = modApiFunc("Session", "get", "FormData");
modApiFunc("Session", "un_set", "FormData");
}
if (modApiFunc("Session", "is_set", "UpdateParent") && modApiFunc("Session", "get", "UpdateParent") == true) {
modApiFunc("Session", "un_set", "UpdateParent");
$application->UpdateParent();
}
}
示例11: CustomerPersonalInfo
function CustomerPersonalInfo()
{
global $application;
#check if fatal errors of the block tag exist
$this->NoView = false;
if ($application->issetBlockTagFatalErrors("CustomerPersonalInfo")) {
$this->NoView = true;
}
$settings = modApiFunc('Customer_Account', 'getSettings');
if ($settings['CHECKOUT_TYPE'] == CHECKOUT_TYPE_QUICK) {
$this->NoView = true;
}
$this->customer_obj = null;
$email = modApiFunc('Customer_Account', 'getCurrentSignedCustomer');
if ($email != null) {
$this->customer_obj =& $application->getInstance('CCustomerInfo', $email);
$this->customer_obj->setPersonInfoAttrsType(PERSON_INFO_GROUP_ATTR_VISIBLE);
}
loadCoreFile('html_form.php');
$this->invalid_fields = array();
if (modApiFunc('Session', 'is_set', 'InvalidFields')) {
$this->invalid_fields = modApiFunc('Session', 'get', 'InvalidFields');
modApiFunc('Session', 'un_set', 'InvalidFields');
}
}
示例12: output
function output()
{
global $application;
loadCoreFile('html_form.php');
$this->_messageResources =& Subscriptions::getMessageResources();
$this->_tmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/');
$this->_topic_id = modApiFunc('Request', 'getValueByKey', 'topic');
if (!empty($this->_topic_id)) {
$this->_mode = SM_EDIT_TOPIC;
} else {
$this->_mode = SM_NEW_TOPIC;
}
$this->initFormData();
if (@$this->ViewState['hasCloseScript'] == 'true') {
modApiFunc("application", "closeChild_UpdateParent");
return;
}
$this->_templateContents = array('ErrorsBox', 'AscAction');
$application->registerAttributes($this->_templateContents);
if ($this->_mode == SM_EDIT_TOPIC && empty($this->_topic)) {
return $this->_tmplFiller->fill('', 'errors/no_topic_edit.tpl.html', array('Message' => $this->_messageResources->getMessage(new ActionMessage(array('TOPIC_DOESNT_EXISTS', $this->_topic_id)))));
}
$request = new Request();
$request->setView(CURRENT_REQUEST_URL);
$vars = array('FormAction' => $request->getURL(), 'AscAction' => $this->_mode == SM_NEW_TOPIC ? 'create_topic' : 'update_topic', 'TopicId' => $this->_topic_id, 'WinTitle' => $this->_messageResources->getMessage($this->_mode == SM_NEW_TOPIC ? 'TITLE_ADD_TOPIC' : 'TITLE_EDIT_TOPIC'), 'TopicName' => @$this->POST['topic_name'], 'TopicStatusSelect' => $this->getTopicStatusSelect('topic_status', @$this->POST['topic_status']), 'TopicAccessSelect' => $this->getTopicAccessSelect('topic_access', @$this->POST['topic_access']), 'TopicAutosubscribeSelect' => $this->getTopicAutoSubscribeSelect('topic_auto', @$this->POST['topic_auto']));
$result = $this->_tmplFiller->fill('', 'edit_topic.tpl.html', $vars);
return $result;
}
示例13: doInstall
function doInstall()
{
loadCoreFile('obj_xml.php');
$parser = new xml_doc(file_get_contents(CUSTOMER_ACCOUNT_INSTALL_DATA_XML));
$parser->parse();
$groups_ids = array();
$attrs_ids = array();
foreach ($parser->xml_index as $tag) {
if ($tag->name == 'CUSTOMER_ACCOUNT_INSTALL_DATA') {
foreach ($tag->children as $id_child) {
switch ($id_child->name) {
case 'PERSON_INFO_GROUPS':
$groups_ids = $this->__install_ProcessPersonInfoGroups($id_child);
break;
case 'PERSON_INFO_ATTRS':
$attrs_ids = $this->__install_ProcessPersonInfoAttrs($id_child);
break;
case 'ATTRS_TO_GROUPS':
$this->__install_ProcessAttrsToGroups($id_child, $groups_ids, $attrs_ids);
break;
case 'SETTINGS':
$this->__install_ProcessSettings($id_child);
break;
}
}
}
}
$this->__install_AddAttrsVisibleNames();
$this->__install_addEventsHandlers();
return;
}
示例14: OrderSearchByIdForm
function OrderSearchByIdForm()
{
global $application;
#check if fatal errors of the block tag exist
$this->NoView = false;
if ($application->issetBlockTagFatalErrors("OrderSearchByIdForm")) {
$this->NoView = true;
}
$settings = modApiFunc('Customer_Account', 'getSettings');
if ($settings['CHECKOUT_TYPE'] == CHECKOUT_TYPE_QUICK) {
$this->NoView = true;
}
loadCoreFile('html_form.php');
$this->customer_obj = null;
$this->incoming_filter = null;
$email = modApiFunc('Customer_Account', 'getCurrentSignedCustomer');
if ($email !== null) {
$this->customer_obj =& $application->getInstance('CCustomerInfo', $email);
$request = new Request();
$filter = $request->getValueByKey('filter');
if ($filter != null) {
$orders_search_filter = null;
if ($filter == 'id') {
$o_id = $request->getValueByKey('order_id');
if (!$o_id || !is_int($o_id)) {
return;
}
$orders_search_filter = array('type' => 'id', 'order_status' => ORDER_STATUS_ALL, 'order_id' => intval($o_id));
}
$this->incoming_filter = $orders_search_filter;
}
}
}
示例15: PO_OptionsList
function PO_OptionsList()
{
global $application;
$this->MessageResources =& $application->getInstance('MessageResources', "product-options-messages", "AdminZone");
$this->Hints =& $application->getInstance('Hint');
$this->NoView = false;
loadCoreFile('html_form.php');
}