当前位置: 首页>>代码示例>>PHP>>正文


PHP MsgBox函数代码示例

本文整理汇总了PHP中MsgBox函数的典型用法代码示例。如果您正苦于以下问题:PHP MsgBox函数的具体用法?PHP MsgBox怎么用?PHP MsgBox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MsgBox函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: displayList

 function displayList($aParams)
 {
     $sSampleType = $aParams['sample_type'];
     $iViewerType = $aParams['viewer_type'];
     $iStart = isset($aParams['start']) ? (int) $aParams['start'] : -1;
     $iPerPage = isset($aParams['count']) ? (int) $aParams['count'] : -1;
     $bShowEmpty = isset($aParams['show_empty']) ? $aParams['show_empty'] : true;
     $sModuleUri = $this->_oConfig->getUri();
     $aEntries = $this->_oDb->getEntries($aParams);
     if (empty($aEntries)) {
         return $bShowEmpty ? MsgBox(_t('_' . $sModuleUri . '_msg_no_results')) : "";
     }
     $sBaseUri = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
     $sJsMainObject = $this->_oConfig->getJsObject();
     $sList = '';
     foreach ($aEntries as $aEntry) {
         $sList .= $this->displayItem($aParams, $aEntry);
     }
     $sPaginate = '';
     if (!in_array($sSampleType, array('id', 'uri', 'view', 'search_unit'))) {
         if (!empty($sSampleType)) {
             $this->_updatePaginate($aParams);
         }
         $sPaginate = $this->oPaginate->getPaginate($iStart, $iPerPage);
     }
     return $this->parseHtmlByName('list.html', array('sample' => $sSampleType, 'list' => $sList, 'paginate' => $sPaginate, 'loading' => LoadingBox($sModuleUri . '-' . $sSampleType . '-loading')));
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:27,代码来源:BxDolTextTemplate.php

示例2: PageCompMainCode

/**
 * page code function
 */
function PageCompMainCode()
{
    ob_start();
    $oAccount = BxDolAccount::getInstance();
    $aAccountInfo = $oAccount ? $oAccount->getInfo() : false;
    if (!$aAccountInfo) {
        return DesignBoxContent("Send Email example", 'Please login first', BX_DB_PADDING_DEF);
    }
    echo "<h2>Account info</h2>";
    echo "Email: " . $aAccountInfo['email'] . '<br />';
    echo "Email Confirmed: " . ($aAccountInfo['email_confirmed'] ? 'yes' : 'no') . '<br />';
    echo "Receive site updates: " . ($aAccountInfo['receive_updates'] ? 'yes' : 'no') . '<br />';
    echo "Receive site newsletters: " . ($aAccountInfo['receive_news'] ? 'yes' : 'no') . '<br />';
    echo "Site emails are sent from: " . getParam('site_email_notify') . '<br />';
    $a = array('sys' => array('title' => "Send me system email", 'type' => BX_EMAIL_SYSTEM, 'subj' => 'System Email', 'body' => 'This is system email <br /> {unsubscribe}'), 'notif' => array('title' => "Send me notification", 'type' => BX_EMAIL_NOTIFY, 'subj' => 'Notification Email', 'body' => 'This is notification email<br /> {unsubscribe}'), 'mass' => array('title' => "Send me bulk email", 'type' => BX_EMAIL_MASS, 'subj' => 'Bulk Email', 'body' => 'This is bulk email<br /> {unsubscribe}'));
    $sSendMail = bx_get('send');
    if ($sSendMail && isset($a[$sSendMail])) {
        echo "<h2>Send Email Result</h2>";
        $r = $a[$sSendMail];
        if (sendMail($aAccountInfo['email'], $r['subj'], $r['body'], 0, array(), $r['type'])) {
            echo MsgBox($r['subj'] . ' - successfully sent');
        } else {
            echo MsgBox($r['subj'] . ' - sent failed');
        }
    }
    echo "<h2>Send email</h2>";
    foreach ($a as $k => $r) {
        echo '<a href="samples/email.php?send=' . $k . '">' . $r['title'] . '</a><br />';
    }
    return DesignBoxContent("Send Email Example", ob_get_clean(), BX_DB_PADDING_DEF);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:34,代码来源:email.php

示例3: serviceGetBlockView

 /**
  * SERVICE METHODS
  * 
  * Get View block for a separate page. Will return a block with "Empty" message if nothing found.
  */
 public function serviceGetBlockView($sType = '', $iStart = -1, $iPerPage = -1, $aModules = array())
 {
     $aBrowseTypes = array(BX_BASE_MOD_NTFS_TYPE_CONNECTIONS, BX_BASE_MOD_NTFS_TYPE_OBJECT_OWNER);
     if (empty($sType)) {
         $mType = bx_get('type');
         if ($mType !== false && in_array($mType, $aBrowseTypes)) {
             $sType = $mType;
         }
         if (empty($sType)) {
             $sType = BX_NTFS_TYPE_DEFAULT;
         }
     }
     $iOwnerId = $this->getUserId();
     if (!$iOwnerId) {
         return array('content' => MsgBox(_t('_bx_ntfs_txt_msg_no_results')));
     }
     $aParams = $this->_prepareParams($sType, $iOwnerId, $iStart, $iPerPage, $aModules);
     $sContent = $this->_oTemplate->getViewBlock($aParams);
     $aParams['browse'] = 'first';
     $aEvent = $this->_oDb->getEvents($aParams);
     if (!empty($aEvent)) {
         $this->_oDb->markAsRead($iOwnerId, $aEvent['id']);
     }
     $sModule = $this->_oConfig->getName();
     $sJsObject = $this->_oConfig->getJsObject('view');
     $aMenu = array();
     foreach ($aBrowseTypes as $sBrowseType) {
         $aMenu[] = array('id' => $sModule . '-' . $sBrowseType, 'name' => $sModule . '-' . $sBrowseType, 'class' => '', 'title' => '_bx_ntfs_menu_item_title_' . $sBrowseType, 'target' => '_self', 'onclick' => 'javascript:' . $sJsObject . '.changeType(this, \'' . $sBrowseType . '\');');
     }
     $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id' => $sModule . '-browse-types', 'menu_items' => $aMenu), $this->_oTemplate);
     $oMenu->setSelected($sModule, $sModule . '-' . $sType);
     return array('content' => $sContent, 'menu' => $oMenu);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:38,代码来源:BxNtfsModule.php

示例4: actionAdministration

 function actionAdministration()
 {
     if (!$this->isAdmin()) {
         $this->_oTemplate->displayAccessDenied();
         return;
     }
     $this->_oTemplate->pageStart();
     $iId = $this->_oDb->getSettingsCategory();
     if (empty($iId)) {
         echo MsgBox(_t('_sys_request_page_not_found_cpt'));
         $this->_oTemplate->pageCodeAdmin(_t('_bx_profiler_administration'));
         return;
     }
     bx_import('BxDolAdminSettings');
     $mixedResult = '';
     if (isset($_POST['save']) && isset($_POST['cat'])) {
         $oSettings = new BxDolAdminSettings($iId);
         $mixedResult = $oSettings->saveChanges($_POST);
     }
     $oSettings = new BxDolAdminSettings($iId);
     $sResult = $oSettings->getForm();
     if ($mixedResult !== true && !empty($mixedResult)) {
         $sResult = $mixedResult . $sResult;
     }
     $aVars = array('content' => $sResult);
     echo $this->_oTemplate->adminBlock($this->_oTemplate->parseHtmlByName('default_padding', $aVars), _t('_bx_profiler_administration'));
     $this->_oTemplate->addCssAdmin('main.css');
     $this->_oTemplate->addCssAdmin('forms_adv.css');
     $this->_oTemplate->pageCodeAdmin(_t('_bx_profiler_administration'));
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:30,代码来源:BxProfilerModule.php

示例5: getPostForm

 function getPostForm($iUnitID = 0)
 {
     $sAddNewC = _t('_bx_quotes_add_new');
     $sAction = 'add';
     $sQText = $sQText = '';
     if ($iUnitID) {
         $aQinfo = $this->_oDb->getQuote($iUnitID);
         $sQText = $aQinfo['Text'];
         $sQAuthor = $aQinfo['Author'];
         $sAction = 'edit';
     }
     $aForm = array('form_attrs' => array('name' => 'create_quotes_form', 'action' => BX_DOL_URL_ROOT . 'modules/?r=quotes/administration/', 'method' => 'post'), 'params' => array('db' => array('table' => 'bx_quotes_units', 'key' => 'ID', 'submit_name' => 'add_button')), 'inputs' => array('action' => array('type' => 'hidden', 'name' => 'action', 'value' => $sAction), 'Text' => array('type' => 'textarea', 'name' => 'Text', 'caption' => _t('_bx_quotes_text'), 'required' => true, 'value' => $sQText, 'checker' => array('func' => 'length', 'params' => array(3, 1024), 'error' => _t('_bx_quotes_text_err', 1024)), 'db' => array('pass' => 'Xss')), 'Author' => array('type' => 'text', 'name' => 'Author', 'caption' => _t('_bx_quotes_author'), 'required' => true, 'value' => $sQAuthor, 'checker' => array('func' => 'length', 'params' => array(3, 128), 'error' => _t('_bx_quotes_author_err', 128)), 'db' => array('pass' => 'Xss')), 'add_button' => array('type' => 'submit', 'name' => 'add_button', 'value' => _t('_Submit'))));
     if ($iUnitID) {
         $aForm['inputs']['hidden_unitid'] = array('type' => 'hidden', 'name' => 'ID', 'value' => $iUnitID);
     }
     $sCode = '';
     $oForm = new BxTemplFormView($aForm);
     $oForm->initChecker();
     if ($oForm->isSubmittedAndValid()) {
         $sCode = MsgBox(_t('_bx_quotes_fail'), 1);
         $aValsAdd = array();
         $iLastId = -1;
         if ($iUnitID > 0) {
             $oForm->update($iUnitID, $aValsAdd);
             $iLastId = $iUnitID;
             $sCode = MsgBox(_t('_bx_quotes_edited_success'), 1);
         } else {
             $iLastId = $oForm->insert($aValsAdd);
             $sCode = MsgBox(_t('_bx_quotes_success'), 1);
         }
     }
     return DesignBoxAdmin($sAddNewC, $sCode . $oForm->getCode(), '', '', 11);
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:33,代码来源:BxQuotesModule.php

示例6: getFormCode

 function getFormCode()
 {
     $oForm = new BxTemplFormView($this->aForm);
     $oForm->initChecker();
     if ($oForm->isSubmittedAndValid()) {
         $aValsAdd = array('Date' => time(), 'Uri' => $oForm->generateUri(), 'Status' => 'active', 'Owner' => $this->iOwnerId);
         if ($this->iAlbumId > 0 && $this->aInfo['Owner'] == $this->iOwnerId) {
             $aValsAdd = array('Date' => time());
             if (!$oForm->update($this->iAlbumId, $aValsAdd)) {
                 return MsgBox(_t('_sys_album_save_error'));
             } else {
                 return MsgBox(_t('_sys_album_save_succ'));
             }
         } else {
             $iAlbumId = $oForm->insert($aValsAdd);
             if (!$iAlbumId) {
                 return MsgBox(_t('_sys_album_save_error'));
             } else {
                 return MsgBox(_t('_sys_album_save_succ'));
             }
         }
     } else {
         return $oForm->getCode();
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:25,代码来源:BxBaseAlbumForm.php

示例7: getBlockCode_Favorited

 function getBlockCode_Favorited($aParams = array())
 {
     $sEmpty = MsgBox(_t('_Empty'));
     if ($this->iOwnerId == 0) {
         return $sEmpty;
     }
     $sUnitCssClass = isset($aParams['unit_css_class']) ? $aParams['unit_css_class'] : '.sys_file_search_unit';
     $oSearch = $this->getSearchObject();
     $oSearch->clearFilters(array('activeStatus', 'allow_view', 'album_status', 'albumType', 'ownerStatus'), array('albumsObjects', 'albums', 'icon'));
     if (isset($oSearch->aAddPartsConfig['favorite']) && !empty($oSearch->aAddPartsConfig['favorite'])) {
         $oSearch->aCurrent['join']['favorite'] = $oSearch->aAddPartsConfig['favorite'];
         $oSearch->aCurrent['restriction']['fav'] = array('value' => $this->iOwnerId, 'field' => $oSearch->aAddPartsConfig['favorite']['userField'], 'operator' => '=', 'table' => $oSearch->aAddPartsConfig['favorite']['table']);
     }
     $oSearch->aCurrent['paginate']['perPage'] = (int) $this->oConfig->getGlParam('number_top');
     $sCode = $oSearch->displayResultBlock();
     if (!empty($sUnitCssClass)) {
         $sCode = $GLOBALS['oFunctions']->centerContent($sCode, $sUnitCssClass);
     }
     if ($oSearch->aCurrent['paginate']['totalNum'] > 0) {
         $oSearch->aConstants['linksTempl']['favorited'] = 'browse/favorited';
         $aBottomMenu = $oSearch->getBottomMenu('favorited', 0, '');
         return array($sCode, array(), $aBottomMenu, false);
     } else {
         return array($sEmpty, array(), array(), '');
     }
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:26,代码来源:BxDolFilesPageAlbumsOwner.php

示例8: actionAuth

 function actionAuth()
 {
     $oRequest = OAuth2\Request::createFromGlobals();
     $oResponse = new OAuth2\Response();
     // validate the authorize request
     if (!$this->_oServer->validateAuthorizeRequest($oRequest, $oResponse)) {
         require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
         $o = json_decode($oResponse->getResponseBody());
         $this->_oTemplate->getPage(false, MsgBox($o->error_description));
     }
     if (!isLogged()) {
         require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
         $sForceRelocate = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'auth/?client_id=' . bx_get('client_id') . '&response_type=' . bx_get('response_type') . '&state=' . bx_get('state') . '&redirect_uri=' . bx_get('redirect_uri');
         bx_login_form(false, false, $sForceRelocate);
         return;
     }
     $aProfiles = BxDolAccount::getInstance()->getProfiles();
     if (!($iProfileId = $this->_oDb->getSavedProfile($aProfiles)) && empty($_POST)) {
         $oPage = BxDolPage::getObjectInstanceByURI('oauth-authorization');
         $this->_oTemplate->getPage(false, $oPage->getCode());
         return;
     }
     if (!$iProfileId) {
         $iProfileId = bx_get('profile_id');
     }
     $this->_oServer->handleAuthorizeRequest($oRequest, $oResponse, (bool) $iProfileId, $iProfileId);
     $oResponse->send();
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:28,代码来源:BxOAuthModule.php

示例9: displayOrders

 function displayOrders($sType, $aParams)
 {
     if (empty($aParams['per_page'])) {
         $aParams['per_page'] = $this->_oConfig->getPerPage('orders');
     }
     $sJsObject = $this->_oConfig->getJsObject('orders');
     $sMethodNameInfo = 'get' . ucfirst($sType) . 'Orders';
     $aOrders = $this->_oDb->{$sMethodNameInfo}($aParams);
     if (empty($aOrders)) {
         return MsgBox(_t('_payment_txt_empty'));
     }
     $aAdministrator = $this->_oDb->getVendorInfoProfile(BX_PMT_ADMINISTRATOR_ID);
     //--- Get Orders ---//
     $aResultOrders = array();
     foreach ($aOrders as $aOrder) {
         if (empty($aOrder['user_id']) || empty($aOrder['user_name'])) {
             $aOrder['user_name'] = $aAdministrator['profile_name'];
             $aOrder['user_url'] = $aAdministrator['profile_url'];
         } else {
             $aOrder['user_name'] = getNickName($aOrder['user_id']);
             $aOrder['user_url'] = getProfileLink($aOrder['user_id']);
         }
         $aResultOrders[] = array_merge($aOrder, array('type' => $sType, 'bx_if:show_link' => array('condition' => !empty($aOrder['user_url']), 'content' => array('user_name' => $aOrder['user_name'], 'user_url' => $aOrder['user_url'])), 'bx_if:show_text' => array('condition' => empty($aOrder['user_url']), 'content' => array('user_name' => $aOrder['user_name'])), 'bx_if:pending' => array('condition' => $sType == BX_PMT_ORDERS_TYPE_PENDING, 'content' => array('id' => $aOrder['id'], 'order' => $aOrder['order'])), 'bx_if:processed' => array('condition' => $sType == BX_PMT_ORDERS_TYPE_PROCESSED || $sType == BX_PMT_ORDERS_TYPE_HISTORY, 'content' => array('order' => $aOrder['order'])), 'products' => $aOrder['products'], 'items' => $aOrder['items'], 'js_object' => $sJsObject));
     }
     //--- Get Paginate Panel ---//
     $sPaginatePanel = "";
     $sMethodNameCount = 'get' . ucfirst($sType) . 'OrdersCount';
     if (($iCount = $this->_oDb->{$sMethodNameCount}($aParams)) > $aParams['per_page']) {
         $oPaginate = new BxDolPaginate(array('page_url' => 'javascript:void(0);', 'start' => $aParams['start'], 'count' => $iCount, 'per_page' => $aParams['per_page'], 'per_page_step' => 2, 'per_page_interval' => 3, 'page_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . ($sType == BX_PMT_ORDERS_TYPE_HISTORY ? 'history' : 'orders') . '/', 'on_change_page' => $sJsObject . ".changePage('" . $sType . "', {start}, {per_page}, " . $aParams['seller_id'] . ")"));
         $sPaginatePanel = $oPaginate->getPaginate();
     }
     return $this->parseHtmlByName($sType . '_orders.html', array('bx_repeat:orders' => $aResultOrders, 'paginate_panel' => $sPaginatePanel));
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:33,代码来源:BxPmtTemplate.php

示例10: PageCompPageMainCodeWithForm

function PageCompPageMainCodeWithForm()
{
    global $oTemplConfig, $site;
    $aForm = array('form_attrs' => array('id' => 'post_us_form', 'action' => BX_DOL_URL_ROOT . 'contact.php', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'do_submit')), 'inputs' => array('name' => array('type' => 'text', 'name' => 'name', 'caption' => _t('_Your name'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(1, 150), 'error' => _t('_Name is required'))), 'email' => array('type' => 'text', 'name' => 'email', 'caption' => _t('_Your email'), 'required' => true, 'checker' => array('func' => 'email', 'error' => _t('_Incorrect Email'))), 'message_subject' => array('type' => 'text', 'name' => 'subject', 'caption' => _t('_message_subject'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(5, 300), 'error' => _t('_ps_ferr_incorrect_length'))), 'message_text' => array('type' => 'textarea', 'name' => 'body', 'caption' => _t('_Message text'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(10, 5000), 'error' => _t('_ps_ferr_incorrect_length'))), 'captcha' => array('type' => 'captcha', 'caption' => _t('_Enter what you see'), 'name' => 'securityImageValue', 'required' => true, 'checker' => array('func' => 'captcha', 'error' => _t('_Incorrect Captcha'))), 'submit' => array('type' => 'submit', 'name' => 'do_submit', 'value' => _t('_Submit'))));
    $oForm = new BxTemplFormView($aForm);
    $sForm = $oForm->getCode();
    $oForm->initChecker();
    if ($oForm->isSubmittedAndValid()) {
        $sSenderName = process_pass_data($_POST['name'], BX_TAGS_STRIP);
        $sSenderEmail = process_pass_data($_POST['email'], BX_TAGS_STRIP);
        $sLetterSubject = process_pass_data($_POST['subject'], BX_TAGS_STRIP);
        $sLetterBody = process_pass_data($_POST['body'], BX_TAGS_STRIP);
        $sLetterBody = $sLetterBody . "\r\n" . '============' . "\r\n" . _t('_from') . ' ' . $sSenderName . "\r\n" . 'with email ' . $sSenderEmail;
        if (sendMail($site['email'], $sLetterSubject, $sLetterBody)) {
            $sActionKey = '_ADM_PROFILE_SEND_MSG';
        } else {
            $sActionKey = '_Email sent failed';
        }
        $sActionText = MsgBox(_t($sActionKey));
        $sForm = $sActionText . $sForm;
    } else {
        $sForm = $oForm->getCode();
    }
    return DesignBoxContent(_t('_CONTACT_H1'), $sForm, $oTemplConfig->PageCompThird_db_num);
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:25,代码来源:contact.php

示例11: PageCompMainCode

/**
 * page code function
 */
function PageCompMainCode()
{
    global $oTemplConfig;
    global $logged;
    $iId = (int) $_COOKIE['memberID'];
    if ($iId > 0) {
        $sPassword = getPassword($iId);
        $bEnableRay = getParam('enable_ray') == 'on';
        $check_res = checkAction($iId, ACTION_ID_USE_RAY_CHAT);
        if ($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) {
            $ret .= getApplicationContent('chat', 'user', array('id' => $iId, 'password' => $sPassword));
        } else {
            // $ret .= '
            // <center>
            // <table width=100% height=100% cellpadding=0 cellspacing=0>
            // <td align=center valign=center>
            // <table width="90%" height="70" cellpadding="5" cellspacing="1" class="table">
            // <tr>
            // <td class="panel" width="100%" align="center" valign="middle">
            // <div align="center" class="small">' . $check_res[CHECK_ACTION_MESSAGE] . '</div>
            // </td>
            // </tr>
            // </table>
            // </td>
            // </table>
            // </center>';
            $ret .= MsgBox($check_res[CHECK_ACTION_MESSAGE]);
        }
        return DesignBoxContent(_t("_RAY_CHAT"), $ret, $oTemplConfig->PageCompThird_db_num);
    } else {
        return DesignBoxContent(_t('_LOGIN_ERROR'), MsgBox(_t('_Please login before using Ray chat')), 1);
    }
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:36,代码来源:chat.php

示例12: _getList

function _getList($mixedResult, $bActive = false)
{
    $aForm = array('form_attrs' => array('id' => 'adm-email-templates', 'action' => $GLOBALS['site']['url_admin'] . 'email_templates.php', 'method' => 'post', 'enctype' => 'multipart/form-data'), 'params' => array('db' => array('table' => 'sys_email_templates', 'key' => 'ID', 'uri' => '', 'uri_title' => '', 'submit_name' => 'adm-emial-templates-save')), 'inputs' => array());
    $aLanguages = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Title` AS `title` FROM `sys_localization_languages`");
    $aLanguageChooser = array(array('key' => 0, 'value' => 'default'));
    foreach ($aLanguages as $aLanguage) {
        $aLanguageChooser[] = array('key' => $aLanguage['id'], 'value' => $aLanguage['title']);
    }
    $sLanguageCpt = _t('_adm_txt_email_language');
    $sSubjectCpt = _t('_adm_txt_email_subject');
    $sBodyCpt = _t('_adm_txt_email_body');
    $aEmails = $GLOBALS['MySQL']->getAll("SELECT `ID` AS `id`, `Name` AS `name`, `Subject` AS `subject`, `Body` AS `body`, `Desc` AS `description` FROM `sys_email_templates` WHERE `LangID`='0' ORDER BY `ID`");
    foreach ($aEmails as $aEmail) {
        $aForm['inputs'] = array_merge($aForm['inputs'], array($aEmail['name'] . '_Beg' => array('type' => 'block_header', 'caption' => $aEmail['description'], 'collapsable' => true, 'collapsed' => true), $aEmail['name'] . '_Language' => array('type' => 'select', 'name' => $aEmail['name'] . '_Language', 'caption' => $sLanguageCpt, 'value' => 0, 'values' => $aLanguageChooser, 'db' => array('pass' => 'Int'), 'attrs' => array('onchange' => "javascript:getTranslations(this)")), $aEmail['name'] . '_Subject' => array('type' => 'text', 'name' => $aEmail['name'] . '_Subject', 'caption' => $sSubjectCpt, 'value' => $aEmail['subject'], 'db' => array('pass' => 'Xss')), $aEmail['name'] . '_Body' => array('type' => 'textarea', 'name' => $aEmail['name'] . '_Body', 'caption' => $sBodyCpt, 'value' => $aEmail['body'], 'db' => array('pass' => 'XssHtml')), $aEmail['name'] . '_End' => array('type' => 'block_end')));
    }
    $aForm['inputs']['adm-emial-templates-save'] = array('type' => 'submit', 'name' => 'adm-emial-templates-save', 'value' => _t('_adm_btn_email_save'));
    $oForm = new BxTemplFormView($aForm);
    $oForm->initChecker();
    $sResult = "";
    if ($oForm->isSubmittedAndValid()) {
        $iResult = 0;
        foreach ($aEmails as $aEmail) {
            $iEmailId = (int) $GLOBALS['MySQL']->getOne("SELECT `ID` FROM `sys_email_templates` WHERE `Name`='" . process_db_input($aEmail['name']) . "' AND `LangID`='" . (int) $_POST[$aEmail['name'] . '_Language'] . "' LIMIT 1");
            if ($iEmailId != 0) {
                $iResult += (int) $GLOBALS['MySQL']->query("UPDATE `sys_email_templates` SET `Subject`='" . process_db_input($_POST[$aEmail['name'] . '_Subject']) . "', `Body`='" . process_db_input($_POST[$aEmail['name'] . '_Body']) . "' WHERE `ID`='" . $iEmailId . "'");
            } else {
                $iResult += (int) $GLOBALS['MySQL']->query("INSERT INTO `sys_email_templates` SET `Name`='" . process_db_input($aEmail['name']) . "', `Subject`='" . process_db_input($_POST[$aEmail['name'] . '_Subject']) . "', `Body`='" . process_db_input($_POST[$aEmail['name'] . '_Body']) . "', `LangID`='" . (int) $_POST[$aEmail['name'] . '_Language'] . "'");
            }
        }
        $bActive = true;
        $sResult .= MsgBox(_t($iResult > 0 ? "_adm_txt_email_success_save" : "_adm_txt_email_nothing_changed"), 3);
    }
    $sResult .= $oForm->getCode();
    return $GLOBALS['oAdmTemplate']->parseHtmlByName('email_templates_list.html', array('display' => $bActive ? 'block' : 'none', 'content' => stripslashes($sResult), 'loading' => LoadingBox('adm-email-loading')));
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:35,代码来源:email_templates.php

示例13: PageCompPageMainCode

/**
 * page code function
 */
function PageCompPageMainCode($iID, $sConfCode)
{
    global $site;
    $ID = (int) $iID;
    $ConfCode = clear_xss($sConfCode);
    $p_arr = getProfileInfo($ID);
    if (!$p_arr) {
        $_page['header'] = _t("_Error");
        $_page['header_text'] = _t("_Profile Not found");
        return MsgBox(_t('_Profile Not found Ex'));
    }
    $aCode = array('message_status' => '', 'message_info' => '', 'bx_if:form' => array('condition' => false, 'content' => array('form' => '')), 'bx_if:next' => array('condtion' => false, 'content' => array('next_url' => '')));
    if ($p_arr['Status'] == 'Unconfirmed') {
        $ConfCodeReal = base64_encode(base64_encode(crypt($p_arr[Email], CRYPT_EXT_DES ? "secret_co" : "se")));
        if (strcmp($ConfCode, $ConfCodeReal) != 0) {
            $aForm = array('form_attrs' => array('action' => BX_DOL_URL_ROOT . 'profile_activate.php', 'method' => 'post', 'name' => 'form_change_status'), 'inputs' => array('conf_id' => array('type' => 'hidden', 'name' => 'ConfID', 'value' => $ID), 'conf_code' => array('type' => 'text', 'name' => 'ConfCode', 'value' => '', 'caption' => _t("_Confirmation code")), 'submit' => array('type' => 'submit', 'name' => 'submit', 'value' => _t("_Submit"))));
            $oForm = new BxTemplFormView($aForm);
            $aCode['message_status'] = _t("_Profile activation failed");
            $aCode['message_info'] = _t("_EMAIL_CONF_FAILED_EX");
            $aCode['bx_if:form']['condition'] = true;
            $aCode['bx_if:form']['content']['form'] = $oForm->getCode();
        } else {
            $aCode['bx_if:next']['condition'] = true;
            $aCode['bx_if:next']['content']['next_url'] = BX_DOL_URL_ROOT . 'member.php';
            $send_act_mail = false;
            if (getParam('autoApproval_ifJoin') == 'on' && !(getParam('sys_dnsbl_enable') && 'approval' == getParam('sys_dnsbl_behaviour') && bx_is_ip_dns_blacklisted('', 'join'))) {
                $status = 'Active';
                $send_act_mail = true;
                $aCode['message_info'] = _t("_PROFILE_CONFIRM");
            } else {
                $status = 'Approval';
                $aCode['message_info'] = _t("_EMAIL_CONF_SUCCEEDED", $site['title']);
            }
            $update = bx_admin_profile_change_status($ID, $status, $send_act_mail);
            // Promotional membership
            if (getParam('enable_promotion_membership') == 'on') {
                $memership_days = getParam('promotion_membership_days');
                setMembership($p_arr['ID'], MEMBERSHIP_ID_PROMOTION, $memership_days, true);
            }
            // check couple profile;
            if ($p_arr['Couple']) {
                $update = bx_admin_profile_change_status($p_arr['Couple'], $status);
                //Promotional membership
                if (getParam('enable_promotion_membership') == 'on') {
                    $memership_days = getParam('promotion_membership_days');
                    setMembership($p_arr['Couple'], MEMBERSHIP_ID_PROMOTION, $memership_days, true);
                }
            }
            if (getParam('newusernotify')) {
                $oEmailTemplates = new BxDolEmailTemplates();
                $aTemplate = $oEmailTemplates->getTemplate('t_UserConfirmed', $p_arr['ID']);
                sendMail($site['email_notify'], $aTemplate['Subject'], $aTemplate['Body'], $p_arr['ID']);
            }
        }
    } else {
        $aCode['message_info'] = _t('_ALREADY_ACTIVATED');
    }
    return $GLOBALS['oSysTemplate']->parseHtmlByName('profile_activate.html', $aCode);
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:62,代码来源:profile_activate.php

示例14: displayResultBlock

 function displayResultBlock()
 {
     $sResult = parent::displayResultBlock();
     if (empty($sResult)) {
         $sResult = MsgBox(_t('_Empty'));
     }
     return $sResult;
 }
开发者ID:noormcs,项目名称:studoro,代码行数:8,代码来源:BxDolPrivacySearch.php

示例15: onDataDeleteAfter

 protected function onDataDeleteAfter($iContentId, $aContentInfo, $oProfile)
 {
     // delete profile
     if (!$oProfile->delete($aContentInfo['profile_id'])) {
         return MsgBox(_t('_sys_txt_error_entry_delete'));
     }
     return '';
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:8,代码来源:BxBaseModProfileFormsEntryHelper.php


注:本文中的MsgBox函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。