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


PHP osc_themes_path函数代码示例

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


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

示例1: doModel

 function doModel()
 {
     $id = Params::getParam('id');
     $page = $this->pageManager->findByPrimaryKey($id);
     if ($page == false) {
         $this->do404();
         return;
     }
     if ($page['b_indelible'] == 1) {
         $this->do404();
         return;
     }
     if (file_exists(osc_themes_path() . osc_theme() . '/' . $page['s_internal_name'] . ".php")) {
         $this->doView($page['s_internal_name'] . ".php");
     } else {
         if (file_exists(osc_themes_path() . osc_theme() . '/pages/' . $page['s_internal_name'] . ".php")) {
             $this->doView("pages/" . $page['s_internal_name'] . ".php");
         } else {
             if (Params::getParam('lang') != '') {
                 Session::newInstance()->_set('userLocale', Params::getParam('lang'));
             }
             $this->_exportVariableToView('page', $page);
             $this->doView('page.php');
         }
     }
 }
开发者ID:acharei,项目名称:OSClass,代码行数:26,代码来源:page.php

示例2: doModel

 function doModel()
 {
     $id = Params::getParam('id');
     $page = false;
     if (is_numeric($id)) {
         $page = $this->pageManager->findByPrimaryKey($id);
     } else {
         $page = $this->pageManager->findByInternalName(Params::getParam('slug'));
     }
     // page not found
     if ($page == false) {
         $this->do404();
         return;
     }
     // this page shouldn't be shown (i.e.: e-mail templates)
     if ($page['b_indelible'] == 1) {
         $this->do404();
         return;
     }
     // export $page content to View
     $this->_exportVariableToView('page', $page);
     if (Params::getParam('lang') != '') {
         Session::newInstance()->_set('userLocale', Params::getParam('lang'));
     }
     // load the right template file
     if (file_exists(osc_themes_path() . osc_theme() . '/page-' . $page['s_internal_name'] . '.php')) {
         $this->doView('page-' . $page['s_internal_name'] . '.php');
     } else {
         $this->doView('page.php');
     }
 }
开发者ID:ricktaylord,项目名称:OSClass,代码行数:31,代码来源:page.php

示例3: __construct

        public function __construct()
        {
            parent::__construct();
            $this->path = osc_themes_path();

            if( Params::getParam('theme') != '' && Session::newInstance()->_get('adminId') != '' ) {
                $this->setCurrentTheme( Params::getParam('theme') );
            } else {
                $this->setCurrentTheme( osc_theme() );
            }

            $functions_path = $this->getCurrentThemePath() . 'functions.php';
            if( file_exists($functions_path) ) {
                require_once $functions_path;
            }

            $info = $this->loadThemeInfo($this->theme);
            if($info['template'] != '' ) {
				//$this->setCurrentTheme($info['template']);
				$parent_functions_path = osc_base_path() . 'oc-content/themes/' . $info['template'] . '/functions.php';
				if( file_exists($parent_functions_path) ) {
					require_once $parent_functions_path;
				}
			}
        }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:25,代码来源:WebThemes.php

示例4: __construct

 public function __construct()
 {
     $this->path = osc_themes_path();
     if (Params::getParam('theme') != '' && Session::newInstance()->_get('adminId') != '') {
         $this->setCurrentTheme(Params::getParam('theme'));
     } else {
         $this->setCurrentTheme(osc_theme());
     }
     $functions_path = $this->getCurrentThemePath() . 'functions.php';
     if (file_exists($functions_path)) {
         require_once $functions_path;
     }
 }
开发者ID:semul,项目名称:Osclass,代码行数:13,代码来源:WebThemes.php

示例5: doModel

 function doModel()
 {
     $id = Params::getParam('id');
     $page = false;
     if (is_numeric($id)) {
         $page = $this->pageManager->findByPrimaryKey($id);
     } else {
         $page = $this->pageManager->findByInternalName(Params::getParam('slug'));
     }
     // page not found
     if ($page == false) {
         $this->do404();
         return;
     }
     // this page shouldn't be shown (i.e.: e-mail templates)
     if ($page['b_indelible'] == 1) {
         $this->do404();
         return;
     }
     $kwords = array('{WEB_URL}', '{WEB_TITLE}');
     $rwords = array(osc_base_url(), osc_page_title());
     foreach ($page['locale'] as $k => $v) {
         $page['locale'][$k]['s_title'] = str_ireplace($kwords, $rwords, osc_apply_filter('email_description', $v['s_title']));
         $page['locale'][$k]['s_text'] = str_ireplace($kwords, $rwords, osc_apply_filter('email_description', $v['s_text']));
     }
     // export $page content to View
     $this->_exportVariableToView('page', $page);
     if (Params::getParam('lang') != '') {
         Session::newInstance()->_set('userLocale', Params::getParam('lang'));
     }
     $meta = json_decode($page['s_meta'], true);
     // load the right template file
     if (file_exists(osc_themes_path() . osc_theme() . '/page-' . $page['s_internal_name'] . '.php')) {
         $this->doView('page-' . $page['s_internal_name'] . '.php');
     } else {
         if (isset($meta['template']) && file_exists(osc_themes_path() . osc_theme() . '/' . $meta['template'])) {
             $this->doView($meta['template']);
         } else {
             if (isset($meta['template']) && file_exists(osc_plugins_path() . '/' . $meta['template'])) {
                 osc_run_hook('before_html');
                 require osc_plugins_path() . '/' . $meta['template'];
                 Session::newInstance()->_clearVariables();
                 osc_run_hook('after_html');
             } else {
                 $this->doView('page.php');
             }
         }
     }
 }
开发者ID:jmcclenon,项目名称:Osclass,代码行数:49,代码来源:page.php

示例6: osc_render_file

/**
 * Render the specified file
 *
 * @param string $file must be a relative path, from PLUGINS_PATH
 */
function osc_render_file($file = '')
{
    if ($file == '') {
        $file = __get('file');
    }
    // Clean $file to prevent hacking of some type
    osc_sanitize_url($file);
    $file = str_replace("../", "", str_replace("..\\", "", str_replace("://", "", preg_replace("|http([s]*)|", "", $file))));
    if (file_exists(osc_theme() . $file)) {
        include osc_themes_path() . $file;
    } else {
        if (file_exists(osc_plugins_path() . $file)) {
            include osc_plugins_path() . $file;
        }
    }
}
开发者ID:mylastof,项目名称:os-class,代码行数:21,代码来源:hTheme.php

示例7: __construct

 function __construct($install = false)
 {
     if (!$install) {
         // get user/admin locale
         if (OC_ADMIN) {
             $locale = osc_current_admin_locale();
         } else {
             $locale = osc_current_user_locale();
         }
         // load core
         $core_file = osc_translations_path() . $locale . '/core.mo';
         $this->_load($core_file, 'core');
         // load messages
         $messages_file = osc_themes_path() . osc_theme() . '/languages/' . $locale . '/messages.mo';
         if (!file_exists($messages_file)) {
             $messages_file = osc_translations_path() . $locale . '/messages.mo';
         }
         $this->_load($messages_file, 'messages');
         // load theme
         $domain = osc_theme();
         $theme_file = osc_themes_path() . $domain . '/languages/' . $locale . '/theme.mo';
         if (!file_exists($theme_file)) {
             if (!file_exists(osc_themes_path() . $domain)) {
                 $domain = 'modern';
             }
             $theme_file = osc_translations_path() . $locale . '/theme.mo';
         }
         $this->_load($theme_file, $domain);
         // load plugins
         $aPlugins = Plugins::listInstalled();
         foreach ($aPlugins as $plugin) {
             $domain = preg_replace('|/.*|', '', $plugin);
             $plugin_file = osc_plugins_path() . $domain . '/languages/' . $locale . '/messages.mo';
             if (file_exists($plugin_file)) {
                 $this->_load($plugin_file, $domain);
             }
         }
     } else {
         $core_file = osc_translations_path() . osc_current_admin_locale() . '/core.mo';
         $this->_load($core_file, 'core');
     }
 }
开发者ID:jmcclenon,项目名称:Osclass,代码行数:42,代码来源:Translation.php

示例8: doModel

 function doModel()
 {
     $user_menu = false;
     if (Params::existParam('route')) {
         $routes = Rewrite::newInstance()->getRoutes();
         $rid = Params::getParam('route');
         $file = '../';
         if (isset($routes[$rid]) && isset($routes[$rid]['file'])) {
             $file = $routes[$rid]['file'];
             $user_menu = $routes[$rid]['user_menu'];
         }
     } else {
         // DEPRECATED: Disclosed path in URL is deprecated, use routes instead
         // This will be REMOVED in 3.4
         $file = Params::getParam('file');
     }
     // valid file?
     if (strpos($file, '../') !== false || strpos($file, '..\\') !== false || stripos($file, '/admin/') !== false) {
         //If the file is inside an "admin" folder, it should NOT be opened in frontend
         $this->do404();
         return;
     }
     // check if the file exists
     if (!file_exists(osc_plugins_path() . $file) && !file_exists(osc_themes_path() . $file)) {
         $this->do404();
         return;
     }
     osc_run_hook('custom_controller');
     $this->_exportVariableToView('file', $file);
     if ($user_menu) {
         if (osc_is_web_user_logged_in()) {
             Params::setParam('in_user_menu', true);
             $this->doView('user-custom.php');
         } else {
             $this->redirectTo(osc_user_login_url());
         }
     } else {
         $this->doView('custom.php');
     }
 }
开发者ID:oanav,项目名称:closetshare,代码行数:40,代码来源:custom.php

示例9: _e

    _e("Can't install a new theme");
    ?>
</p>
                    </div>
                    <p class="text">
                        <?php 
    _e("The theme folder is not writable on your server so you can't upload themes from the administration panel. Please make the theme folder writable and try again.");
    ?>
                    </p>
                    <p class="text">
                        <?php 
    _e('To make the directory writable under UNIX execute this command from the shell:');
    ?>
                    </p>
                    <pre>chmod a+w <?php 
    echo osc_themes_path();
    ?>
</pre>
                <?php 
}
?>
                </div>
            </div>
            <div id="market_installer" class="has-form-actions hide">
                <form action="" method="post">
                    <input type="hidden" name="market_code" id="market_code" value="" />
                    <div class="osc-modal-content-market">
                        <img src="" id="market_thumb" class="float-left"/>
                        <table class="table" cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr class="table-first-row">
开发者ID:jmcclenon,项目名称:Osclass,代码行数:31,代码来源:add.php

示例10: nc_install_user_pic_db

function nc_install_user_pic_db()
{
    // In this case we'll create a table to store the Example attributes
    $conn = getConnection();
    $conn->autocommit(false);
    try {
        $path = osc_themes_path() . 'classified/struct.sql';
        $sql = file_get_contents($path);
        $conn->osc_dbImportSQL($sql);
        $conn->commit();
    } catch (Exception $e) {
        $conn->rollback();
        echo $e->getMessage();
    }
    $conn->autocommit(true);
}
开发者ID:jhalendra,项目名称:classmandu,代码行数:16,代码来源:functions.php

示例11: doModel

 function doModel()
 {
     parent::doModel();
     //specific things for this class
     switch ($this->action) {
         case 'add':
             $this->doView("appearance/add.php");
             break;
         case 'add_post':
             if (defined('DEMO')) {
                 osc_add_flash_warning_message(_m("This action cannot be done because is a demo site"), 'admin');
                 $this->redirectTo(osc_admin_base_url(true) . '?page=appearance');
             }
             $filePackage = Params::getFiles('package');
             if (isset($filePackage['size']) && $filePackage['size'] != 0) {
                 $path = osc_themes_path();
                 (int) ($status = osc_unzip_file($filePackage['tmp_name'], $path));
             } else {
                 $status = 3;
             }
             switch ($status) {
                 case 0:
                     $msg = _m('The theme folder is not writable');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
                 case 1:
                     $msg = _m('The theme has been installed correctly');
                     osc_add_flash_ok_message($msg, 'admin');
                     break;
                 case 2:
                     $msg = _m('The zip file is not valid');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
                 case 3:
                     $msg = _m('No file was uploaded');
                     osc_add_flash_error_message($msg, 'admin');
                     $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=add");
                     break;
                 case -1:
                 default:
                     $msg = _m('There was a problem adding the theme');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
             }
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance");
             break;
         case 'widgets':
             $info = WebThemes::newInstance()->loadThemeInfo(osc_theme());
             $this->_exportVariableToView("info", $info);
             $this->doView('appearance/widgets.php');
             break;
         case 'add_widget':
             $this->doView('appearance/add_widget.php');
             break;
         case 'edit_widget':
             $id = Params::getParam('id');
             $widget = Widget::newInstance()->findByPrimaryKey($id);
             $this->_exportVariableToView("widget", $widget);
             $this->doView('appearance/add_widget.php');
             break;
         case 'delete_widget':
             Widget::newInstance()->delete(array('pk_i_id' => Params::getParam('id')));
             osc_add_flash_ok_message(_m('Widget removed correctly'), 'admin');
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=widgets");
             break;
         case 'edit_widget_post':
             if (!osc_validate_text(Params::getParam("description"))) {
                 osc_add_flash_error_message(_m('Description field is required'), 'admin');
                 $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=widgets");
             }
             $res = Widget::newInstance()->update(array('s_description' => Params::getParam('description'), 's_content' => Params::getParam('content', false, false)), array('pk_i_id' => Params::getParam('id')));
             if ($res) {
                 osc_add_flash_ok_message(_m('Widget updated correctly'), 'admin');
             } else {
                 osc_add_flash_ok_message(_m('Widget cannot be updated correctly'), 'admin');
             }
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=widgets");
             break;
         case 'add_widget_post':
             if (!osc_validate_text(Params::getParam("description"))) {
                 osc_add_flash_error_message(_m('Description field is required'), 'admin');
                 $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=widgets");
             }
             Widget::newInstance()->insert(array('s_location' => Params::getParam('location'), 'e_kind' => 'html', 's_description' => Params::getParam('description'), 's_content' => Params::getParam('content', false, false)));
             osc_add_flash_ok_message(_m('Widget added correctly'), 'admin');
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=widgets");
             break;
         case 'activate':
             Preference::newInstance()->update(array('s_value' => Params::getParam('theme')), array('s_section' => 'osclass', 's_name' => 'theme'));
             osc_add_flash_ok_message(_m('Theme activated correctly'), 'admin');
             osc_run_hook("theme_activate", Params::getParam('theme'));
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance");
             break;
         default:
             $themes = WebThemes::newInstance()->getListThemes();
             $info = WebThemes::newInstance()->loadThemeInfo(osc_theme());
             //preparing variables for the view
             $this->_exportVariableToView("themes", $themes);
             $this->_exportVariableToView("info", $info);
             $this->doView('appearance/index.php');
//.........这里部分代码省略.........
开发者ID:randomecho,项目名称:OSClass,代码行数:101,代码来源:appearance.php

示例12: doModel

 function doModel()
 {
     parent::doModel();
     //specific things for this class
     switch ($this->action) {
         case 'add':
             $this->doView("appearance/add.php");
             break;
         case 'add_post':
             if (defined('DEMO')) {
                 osc_add_flash_warning_message(_m("This action can't be done because it's a demo site"), 'admin');
                 $this->redirectTo(osc_admin_base_url(true) . '?page=appearance');
             }
             osc_csrf_check();
             $filePackage = Params::getFiles('package');
             if (isset($filePackage['size']) && $filePackage['size'] != 0) {
                 $path = osc_themes_path();
                 (int) ($status = osc_unzip_file($filePackage['tmp_name'], $path));
                 @unlink($filePackage['tmp_name']);
             } else {
                 $status = 3;
             }
             switch ($status) {
                 case 0:
                     $msg = _m('The theme folder is not writable');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
                 case 1:
                     $msg = _m('The theme has been installed correctly');
                     osc_add_flash_ok_message($msg, 'admin');
                     break;
                 case 2:
                     $msg = _m('The zip file is not valid');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
                 case 3:
                     $msg = _m('No file was uploaded');
                     osc_add_flash_error_message($msg, 'admin');
                     $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=add");
                     break;
                 case -1:
                 default:
                     $msg = _m('There was a problem adding the theme');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
             }
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance");
             break;
         case 'delete':
             if (defined('DEMO')) {
                 osc_add_flash_warning_message(_m("This action can't be done because it's a demo site"), 'admin');
                 $this->redirectTo(osc_admin_base_url(true) . '?page=appearance');
             }
             osc_csrf_check();
             $theme = Params::getParam('webtheme');
             if ($theme != '') {
                 if ($theme != osc_current_web_theme()) {
                     if (file_exists(osc_content_path() . "themes/" . $theme . "/functions.php")) {
                         include osc_content_path() . "themes/" . $theme . "/functions.php";
                     }
                     osc_run_hook("theme_delete_" . $theme);
                     if (osc_deleteDir(osc_content_path() . "themes/" . $theme . "/")) {
                         osc_add_flash_ok_message(_m("Theme removed successfully"), "admin");
                     } else {
                         osc_add_flash_error_message(_m("There was a problem removing the theme"), "admin");
                     }
                 } else {
                     osc_add_flash_error_message(_m("Current theme can not be deleted"), "admin");
                 }
             } else {
                 osc_add_flash_error_message(_m("No theme selected"), "admin");
             }
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance");
             break;
             /* widgets */
         /* widgets */
         case 'widgets':
             $info = WebThemes::newInstance()->loadThemeInfo(osc_theme());
             $this->_exportVariableToView("info", $info);
             $this->doView('appearance/widgets.php');
             break;
         case 'add_widget':
             $this->doView('appearance/add_widget.php');
             break;
         case 'edit_widget':
             $id = Params::getParam('id');
             $widget = Widget::newInstance()->findByPrimaryKey($id);
             $this->_exportVariableToView("widget", $widget);
             $this->doView('appearance/add_widget.php');
             break;
         case 'delete_widget':
             osc_csrf_check();
             Widget::newInstance()->delete(array('pk_i_id' => Params::getParam('id')));
             osc_add_flash_ok_message(_m('Widget removed correctly'), 'admin');
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=widgets");
             break;
         case 'edit_widget_post':
             osc_csrf_check();
             if (!osc_validate_text(Params::getParam("description"))) {
                 osc_add_flash_error_message(_m('Description field is required'), 'admin');
//.........这里部分代码省略.........
开发者ID:oanav,项目名称:closetshare,代码行数:101,代码来源:appearance.php

示例13: doModel

 function doModel()
 {
     parent::doModel();
     //specific things for this class
     switch ($this->action) {
         case 'add':
             $this->doView("appearance/add.php");
             break;
         case 'add_post':
             if (defined('DEMO')) {
                 osc_add_flash_warning_message(_m("This action can't be done because it's a demo site"), 'admin');
                 $this->redirectTo(osc_admin_base_url(true) . '?page=appearance');
             }
             osc_csrf_check();
             $filePackage = Params::getFiles('package');
             if (isset($filePackage['size']) && $filePackage['size'] != 0) {
                 $path = osc_themes_path();
                 (int) ($status = osc_unzip_file($filePackage['tmp_name'], $path));
             } else {
                 $status = 3;
             }
             switch ($status) {
                 case 0:
                     $msg = _m('The theme folder is not writable');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
                 case 1:
                     $msg = _m('The theme has been installed correctly');
                     osc_add_flash_ok_message($msg, 'admin');
                     break;
                 case 2:
                     $msg = _m('The zip file is not valid');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
                 case 3:
                     $msg = _m('No file was uploaded');
                     osc_add_flash_error_message($msg, 'admin');
                     $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=add");
                     break;
                 case -1:
                 default:
                     $msg = _m('There was a problem adding the theme');
                     osc_add_flash_error_message($msg, 'admin');
                     break;
             }
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance");
             break;
         case 'delete':
             if (defined('DEMO')) {
                 osc_add_flash_warning_message(_m("This action can't be done because it's a demo site"), 'admin');
                 $this->redirectTo(osc_admin_base_url(true) . '?page=appearance');
             }
             osc_csrf_check();
             $theme = Params::getParam('webtheme');
             if ($theme != '') {
                 if ($theme != osc_current_web_theme()) {
                     if (osc_deleteDir(osc_content_path() . "themes/" . $theme . "/")) {
                         osc_add_flash_ok_message(_m("Theme removed successfully"), "admin");
                     } else {
                         osc_add_flash_error_message(_m("There was a problem removing the theme"), "admin");
                     }
                 } else {
                     osc_add_flash_error_message(_m("Current theme can not be deleted"), "admin");
                 }
             } else {
                 osc_add_flash_error_message(_m("No theme selected"), "admin");
             }
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance");
             break;
             /* widgets */
         /* widgets */
         case 'widgets':
             $info = WebThemes::newInstance()->loadThemeInfo(osc_theme());
             $this->_exportVariableToView("info", $info);
             $this->doView('appearance/widgets.php');
             break;
         case 'add_widget':
             $this->doView('appearance/add_widget.php');
             break;
         case 'edit_widget':
             $id = Params::getParam('id');
             $widget = Widget::newInstance()->findByPrimaryKey($id);
             $this->_exportVariableToView("widget", $widget);
             $this->doView('appearance/add_widget.php');
             break;
         case 'delete_widget':
             osc_csrf_check();
             Widget::newInstance()->delete(array('pk_i_id' => Params::getParam('id')));
             osc_add_flash_ok_message(_m('Widget removed correctly'), 'admin');
             $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=widgets");
             break;
         case 'edit_widget_post':
             osc_csrf_check();
             if (!osc_validate_text(Params::getParam("description"))) {
                 osc_add_flash_error_message(_m('Description field is required'), 'admin');
                 $this->redirectTo(osc_admin_base_url(true) . "?page=appearance&action=widgets");
             }
             $res = Widget::newInstance()->update(array('s_description' => Params::getParam('description'), 's_content' => Params::getParam('content', false, false)), array('pk_i_id' => Params::getParam('id')));
             if ($res) {
                 osc_add_flash_ok_message(_m('Widget updated correctly'), 'admin');
//.........这里部分代码省略.........
开发者ID:jmcclenon,项目名称:Osclass,代码行数:101,代码来源:appearance.php

示例14: osc_themes_path

<?php 
require_once osc_themes_path() . 'nepcoders/includes/paypal-api.php';
if (isset($_POST['submit'])) {
    $username = Params::getParam("username");
    $password = Params::getParam("password");
    $signature = Params::getParam("signature");
    $url = Params::getParam("server");
    $status = Params::getParam("status");
    if ($status == "on") {
        $enable = TRUE;
    } else {
        $enable = FALSE;
    }
    $credentials = array('USER' => $username, 'PWD' => $password, 'SIGNATURE' => $signature);
    $method = array('METHOD' => 'GetBalance', 'VERSION' => '74.0');
    $data = PaypalAPI::execute_post($url, array(), $credentials, $method);
    if ($data['ACK'] == 'Failure') {
        echo returnErrorMsgWithHeader($data['L_SHORTMESSAGE0'], $data['L_LONGMESSAGE0']);
    } else {
        if ($data['ACK'] == 'Success') {
            echo returnSuccessMsgWithHeader("Your Available Balance", $data['L_CURRENCYCODE0'] . " " . $data['L_AMT0']);
            $_credentials = Paypal::newInstance()->selectPaypalData();
            if ($_credentials == null) {
                Paypal::newInstance()->insertPaypalData($username, $password, $signature, $url);
            } else {
                Paypal::newInstance()->updatePaypalData($username, $password, $signature, $url, $enable, $_credentials['pk_pp_username']);
            }
        }
    }
}
开发者ID:jhalendra,项目名称:classmandu,代码行数:30,代码来源:paypal.php

示例15: osc_themes_path

require_once osc_themes_path() . 'nepcoders/lib/Facebook/FacebookSession.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/FacebookRequest.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/FacebookResponse.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/FacebookSDKException.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/FacebookRequestException.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/FacebookRedirectLoginHelper.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/FacebookAuthorizationException.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/FacebookAuthorizationException.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/GraphObject.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/GraphUser.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/GraphSessionInfo.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/Entities/AccessToken.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/HttpClients/FacebookCurl.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/HttpClients/FacebookHttpable.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/HttpClients/FacebookCurlHttpClient.php';
require_once osc_themes_path() . 'nepcoders/lib/Facebook/autoload.php';
/**
FACEBOOK NAMESPACES

 **/
//USING NAMESPACES
use Facebook\FacebookSession;
use Facebook\FacebookRedirectLoginHelper;
use Facebook\FacebookRequest;
use Facebook\FacebookResponse;
use Facebook\FacebookSDKException;
use Facebook\FacebookRequestException;
use Facebook\FacebookAuthorizationException;
use Facebook\GraphObject;
use Facebook\GraphUser;
use Facebook\GraphSessionInfo;
开发者ID:jhalendra,项目名称:classmandu,代码行数:31,代码来源:facebook-admin.php


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