コード例 #1
0
ファイル: xbel.inc.php プロジェクト: codeministry/sitebar
 function getXSLPath($file)
 {
     /**
      * The path to URL should use &
      * IE - handles OK
      * Firefox - https://bugzilla.mozilla.org/show_bug.cgi?id=286132
      * Safari - omits parameters after the first
      *
      * Workaround, use ; as parameter delimiter.
      */
     return SB_Page::absBaseUrl() . 'xsl.php?file=' . $file . ';skin=' . str_replace(' ', '%20', SB_Skin::get());
 }
コード例 #2
0
ファイル: page.inc.php プロジェクト: jkischel/sitebar
 static function webPath()
 {
     return SB_Page::cdnBaseUrl() . 'skins/' . rawurlencode(SB_Skin::get());
 }
コード例 #3
0
ファイル: integrator.php プロジェクト: codeministry/sitebar
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
 *  GNU Affero General Public License for more details.                       *
 *                                                                            *
 *  You should have received a copy of the GNU Affero General Public License  *
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.     *
 ******************************************************************************/
require_once './inc/errorhandler.inc.php';
require_once './inc/page.inc.php';
require_once './inc/usermanager.inc.php';
$um = SB_UserManager::staticInstance();
// If we are called the first time, without params and without cookies
if (!isset($_GET['url']) && !isset($_GET['lang'])) {
    SB_Skin::set($um->getParam('user', 'skin'));
    $url = $um->getParamB64('config', 'integrator_url');
    $url .= '?lang=' . $um->getParam('user', 'lang');
    $url .= '&skin=' . SB_Skin::get();
    $url .= '&version=' . SB_CURRENT_RELEASE;
    $url .= '&url=' . SB_Page::absBaseUrl();
    $url .= '&popup_params=' . $um->getParam('user', 'popup_params');
    // Redirect to the central URL, or to the own URL with the information
    header('Location: ' . $url);
    exit;
}
// Now we have the information, we are on the right page and we will use cookies
// We will redirect using META tag later on to support all browsers
if (isset($_GET['url'])) {
    foreach (array('skin', 'version', 'url', 'popup_params') as $key) {
        $cookieName = 'sbi_' . $key;
        $_COOKIE[$cookieName] = $_REQUEST[$key];
        setcookie($cookieName, $_REQUEST[$key]);
    }
コード例 #4
0
ファイル: base.inc.php プロジェクト: codeministry/sitebar
 function _buildSkinList($select = null)
 {
     if ($select == null || $select == '') {
         $select = SB_Skin::get();
     }
     if ($dir = opendir('./skins')) {
         $skins = array();
         while (($dirName = readdir($dir)) !== false) {
             if (!is_dir('./skins/' . $dirName) || !file_exists('./skins/' . $dirName . '/hook.inc.php')) {
                 continue;
             }
             $skins[] = $dirName;
         }
         closedir($dir);
         sort($skins);
         foreach ($skins as $skin) {
             echo '<option ' . ($select == $skin ? 'selected' : '') . ' value="' . $skin . '">' . $skin . "</option>\n";
         }
     }
 }