Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
theme.php
Package: qWikiOffice-Version-1.0.zip [view]
Upload User: snow1005
Upload Date: 2015-11-10
Package Size: 3151k
Code Size: 2k
Category:
Ajax
Development Platform:
JavaScript
- <?php
- /*
- * qWikiOffice Desktop 0.8.1
- * Copyright(c) 2007-2008, Integrated Technologies, Inc.
- * licensing@qwikioffice.com
- *
- * http://www.qwikioffice.com/license
- */
- class theme {
- private $os;
- public function __construct($os){
- $this->os = $os;
- }
- /** get() Returns a string of the theme css to include
- *
- * @param {integer} $member_id
- * @param {integer} $group_id
- * @param {string} $theme_dir
- **/
- public function get(){
- $member_id = $this->os->session->get_member_id();
- $group_id = $this->os->session->get_group_id();
- $theme_dir = $this->os->get_theme_dir();
- // get members saved theme
- $theme = $this->get_link($member_id, $group_id, $theme_dir);
- if($theme == ''){
- // get the default
- $theme = $this->get_link('0', '0', $theme_dir);
- }
- return $theme;
- } // end get()
- /** get_link()
- *
- * @param {integer} $member_id
- * @param {integer} $group_id
- * @param {string} $theme_dir
- **/
- private function get_link($member_id, $group_id, $theme_dir){
- $theme = '';
- if($member_id != "" && $group_id != "" && $theme_dir){
- $sql = "SELECT
- path_to_file as path
- FROM
- qo_themes T
- INNER JOIN qo_styles AS S ON S.qo_themes_id = T.id
- WHERE
- qo_members_id = ".$member_id."
- AND
- qo_groups_id = ".$group_id;
- if(mysql_num_rows($result = mysql_query($sql)) > 0){
- $row = mysql_fetch_assoc($result);
- $theme = '<link id="theme" rel="stylesheet" type="text/css" href="'.$theme_dir.$row["path"].'" />';
- }
- }
- return $theme;
- } // end get_link()
- }
- ?>