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


PHP osc_item_activate_url函数代码示例

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


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

示例1: fn_email_item_validation_non_register_user

function fn_email_item_validation_non_register_user($item)
{
    View::newInstance()->_exportVariableToView('item', $item);
    $mPages = new Page();
    $aPage = $mPages->findByInternalName('email_item_validation_non_register_user');
    $locale = osc_current_user_locale();
    $content = array();
    if (isset($aPage['locale'][$locale]['s_title'])) {
        $content = $aPage['locale'][$locale];
    } else {
        $content = current($aPage['locale']);
    }
    $item_url = osc_item_url();
    $item_url = '<a href="' . $item_url . '" >' . $item_url . '</a>';
    $edit_url = osc_item_edit_url($item['s_secret'], $item['pk_i_id']);
    $delete_url = osc_item_delete_url($item['s_secret'], $item['pk_i_id']);
    $all = '';
    if (isset($item['locale'])) {
        foreach ($item['locale'] as $locale => $data) {
            $locale_name = OSCLocale::newInstance()->listWhere("pk_c_code = '" . $locale . "'");
            $all .= '<br/>';
            if (isset($locale_name[0]) && isset($locale_name[0]['s_name'])) {
                $all .= __('Language') . ': ' . $locale_name[0]['s_name'] . '<br/>';
            } else {
                $all .= __('Language') . ': ' . $locale . '<br/>';
            }
            $all .= __('Title') . ': ' . $data['s_title'] . '<br/>';
            $all .= __('Description') . ': ' . $data['s_description'] . '<br/>';
            $all .= '<br/>';
        }
    } else {
        $all .= __('Title') . ': ' . $item['s_title'] . '<br/>';
        $all .= __('Description') . ': ' . $item['s_description'] . '<br/>';
    }
    // Format activation URL
    $validation_url = osc_item_activate_url($item['s_secret'], $item['pk_i_id']);
    $words = array();
    $words[] = array('{ITEM_DESCRIPTION_ALL_LANGUAGES}', '{ITEM_DESCRIPTION}', '{ITEM_COUNTRY}', '{ITEM_PRICE}', '{ITEM_REGION}', '{ITEM_CITY}', '{ITEM_ID}', '{USER_NAME}', '{USER_EMAIL}', '{WEB_URL}', '{ITEM_TITLE}', '{ITEM_URL}', '{WEB_TITLE}', '{VALIDATION_LINK}', '{VALIDATION_URL}', '{EDIT_LINK}', '{EDIT_URL}', '{DELETE_LINK}', '{DELETE_URL}');
    $words[] = array($all, $item['s_description'], $item['s_country'], osc_prepare_price($item['s_price']), $item['s_region'], $item['s_city'], $item['pk_i_id'], $item['s_contact_name'], $item['s_contact_email'], '<a href="' . osc_base_url() . '" >' . osc_base_url() . '</a>', $item['s_title'], $item_url, osc_page_title(), '<a href="' . $validation_url . '" >' . $validation_url . '</a>', $validation_url, '<a href="' . $edit_url . '">' . $edit_url . '</a>', $edit_url, '<a href="' . $delete_url . '">' . $delete_url . '</a>', $delete_url);
    $title = osc_mailBeauty(osc_apply_filter('email_title', osc_apply_filter('email_item_validation_non_register_user_title', $content['s_title'])), $words);
    $body = osc_mailBeauty(osc_apply_filter('email_description', osc_apply_filter('email_item_validation_non_register_user_description', $content['s_text'])), $words);
    $emailParams = array('subject' => $title, 'to' => $item['s_contact_email'], 'to_name' => $item['s_contact_name'], 'body' => $body, 'alt_body' => $body);
    osc_sendMail($emailParams);
}
开发者ID:nsswaga,项目名称:OSClass,代码行数:44,代码来源:emails.php

示例2: _e

')">
                            <?php 
        _e('Delete', 'osclasswizards');
        ?>
                        </a>
                    </div>
                    <div class="state">
                        <?php 
        if (osc_item_is_inactive()) {
            ?>
                        <span class=" inactive"><?php 
            _e('Inactive', 'osclasswizards');
            ?>
</span>
                        <a class="link active" href="<?php 
            echo osc_item_activate_url();
            ?>
">
                            <?php 
            _e('Activate', 'osclasswizards');
            ?>
                        </a>
                        <?php 
        } else {
            ?>
                        <span class=" active"><?php 
            _e('Active', 'osclasswizards');
            ?>
</span>
                        <a class="link inactive" href="<?php 
            echo osc_item_deactivate_url();
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:loop-user-grid.php

示例3: sendEmails

 public function sendEmails($aItem)
 {
     $item = $aItem['item'];
     $title = $aItem['title'];
     $contactEmail = $aItem['contactEmail'];
     $contactName = $aItem['contactName'];
     View::newInstance()->_exportVariableToView('item', $item);
     $mPages = new Page();
     $locale = osc_current_user_locale();
     /**
      * Send email to user requesting item activation
      */
     if (osc_item_validation_enabled() && (!osc_logged_user_item_validation() || !osc_is_web_user_logged_in())) {
         $aPage = $mPages->findByInternalName('email_item_validation');
         $content = array();
         if (isset($aPage['locale'][$locale]['s_title'])) {
             $content = $aPage['locale'][$locale];
         } else {
             $content = current($aPage['locale']);
         }
         $item_url = osc_item_url();
         $all = '';
         if (isset($item['locale'])) {
             foreach ($item['locale'] as $locale => $data) {
                 $locale_name = OSCLocale::newInstance()->listWhere("pk_c_code = '" . $locale . "'");
                 $all .= '<br/>';
                 if (isset($locale_name[0]) && isset($locale_name[0]['s_name'])) {
                     $all .= __('Language') . ': ' . $locale_name[0]['s_name'] . '<br/>';
                 } else {
                     $all .= __('Language') . ': ' . $locale . '<br/>';
                 }
                 $all .= __('Title') . ': ' . $data['s_title'] . '<br/>';
                 $all .= __('Description') . ': ' . $data['s_description'] . '<br/>';
                 $all .= '<br/>';
             }
         } else {
             $all .= __('Title') . ': ' . $item['s_title'] . '<br/>';
             $all .= __('Description') . ': ' . $item['s_description'] . '<br/>';
         }
         // Format activation URL
         $validation_url = osc_item_activate_url($item['s_secret'], $item['pk_i_id']);
         $words = array();
         $words[] = array('{ITEM_DESCRIPTION_ALL_LANGUAGES}', '{ITEM_DESCRIPTION}', '{ITEM_COUNTRY}', '{ITEM_PRICE}', '{ITEM_REGION}', '{ITEM_CITY}', '{ITEM_ID}', '{USER_NAME}', '{USER_EMAIL}', '{WEB_URL}', '{ITEM_TITLE}', '{ITEM_URL}', '{WEB_TITLE}', '{VALIDATION_LINK}', '{VALIDATION_URL}');
         $words[] = array($all, $item['s_description'], $item['s_country'], $item['f_price'], $item['s_region'], $item['s_city'], $item['pk_i_id'], $item['s_contact_name'], $item['s_contact_email'], osc_base_url(), $item['s_title'], $item_url, osc_page_title(), '<a href="' . $validation_url . '" >' . $validation_url . '</a>', $validation_url);
         $title = osc_mailBeauty($content['s_title'], $words);
         $body = osc_mailBeauty($content['s_text'], $words);
         $emailParams = array('subject' => $title, 'to' => $contactEmail, 'to_name' => $contactName, 'body' => $body, 'alt_body' => $body);
         osc_sendMail($emailParams);
     }
     /**
      * Send email to admin about the new item
      */
     if (osc_notify_new_item()) {
         $aPage = $mPages->findByInternalName('email_admin_new_item');
         $content = array();
         if (isset($aPage['locale'][$locale]['s_title'])) {
             $content = $aPage['locale'][$locale];
         } else {
             $content = current($aPage['locale']);
         }
         $item_url = osc_item_url();
         $all = '';
         if (isset($item['locale'])) {
             foreach ($item['locale'] as $locale => $data) {
                 $locale_name = OSCLocale::newInstance()->listWhere("pk_c_code = '" . $locale . "'");
                 $all .= '<br/>';
                 if (isset($locale_name[0]) && isset($locale_name[0]['s_name'])) {
                     $all .= __('Language') . ': ' . $locale_name[0]['s_name'] . '<br/>';
                 } else {
                     $all .= __('Language') . ': ' . $locale . '<br/>';
                 }
                 $all .= __('Title') . ': ' . $data['s_title'] . '<br/>';
                 $all .= __('Description') . ': ' . $data['s_description'] . '<br/>';
                 $all .= '<br/>';
             }
         } else {
             $all .= __('Title') . ': ' . $item['s_title'] . '<br/>';
             $all .= __('Description') . ': ' . $item['s_description'] . '<br/>';
         }
         // Format activation URL
         $validation_url = osc_item_activate_url($item['s_secret'], $item['pk_i_id']);
         // Format admin edit URL
         $admin_edit_url = osc_item_admin_edit_url($item['pk_i_id']);
         $words = array();
         $words[] = array('{EDIT_LINK}', '{EDIT_URL}', '{ITEM_DESCRIPTION_ALL_LANGUAGES}', '{ITEM_DESCRIPTION}', '{ITEM_COUNTRY}', '{ITEM_PRICE}', '{ITEM_REGION}', '{ITEM_CITY}', '{ITEM_ID}', '{USER_NAME}', '{USER_EMAIL}', '{WEB_URL}', '{ITEM_TITLE}', '{ITEM_URL}', '{WEB_TITLE}', '{VALIDATION_LINK}', '{VALIDATION_URL}');
         $words[] = array('<a href="' . $admin_edit_url . '" >' . $admin_edit_url . '</a>', $admin_edit_url, $all, $item['s_description'], $item['s_country'], $item['f_price'], $item['s_region'], $item['s_city'], $item['pk_i_id'], $item['s_contact_name'], $item['s_contact_email'], osc_base_url(), $item['s_title'], $item_url, osc_page_title(), '<a href="' . $validation_url . '" >' . $validation_url . '</a>', $validation_url);
         $title = osc_mailBeauty($content['s_title'], $words);
         $body = osc_mailBeauty($content['s_text'], $words);
         $emailParams = array('subject' => $title, 'to' => osc_contact_email(), 'to_name' => 'admin', 'body' => $body, 'alt_body' => $body);
         osc_sendMail($emailParams);
     }
 }
开发者ID:hashemgamal,项目名称:OSClass,代码行数:92,代码来源:ItemActions.php


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