Beispiel #1
0
 /**
  * Instance construct
  */
 function __construct($uid = false)
 {
     $this->members = Members::instance($uid);
     $this->memberInfo = MemberInfo::instance();
     $this->oauthaccesstoken = OAuthAccessTokens::instance();
     $this->images = new ImageControl();
 }
Beispiel #2
0
 /**
  * Instance construct
  */
 function __construct()
 {
     $this->header = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" . "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n" . " \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n" . "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n" . "<head>" . "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n" . "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\" />\n" . "<title>" . $this->chapterTitle . "</title>\n" . "</head>\n" . "<body>\n";
     $this->footer = "</body>\n</html>\n";
     $this->epub = new EPub();
     $this->splitter = new EPubChapterSplitter();
     $this->member = Members::instance();
     $this->book = Books::instance();
     $this->menu = BookMenu::instance();
     $this->bookinfo = BookInfo::instance();
     $this->bookfields = BookFields::instance();
     $this->images = new ImageControl();
     $this->bookRecommend = BookRecommend::instance();
     $this->bookRecommendMenu = BookRecommendMenu::instance();
 }
Beispiel #3
0
 /**
  * Delete Comment 
  *
  * @param String or Integer ,primary key
  * @return Boolean , if deleted,return true.
  */
 public function deleteComment($key)
 {
     $comment = self::instance();
     $user = Members::getCurrentUser();
     if ($user) {
         if ($comment->where("id= '{$key}'")->delete()) {
             return true;
         }
     }
     return false;
 }
Beispiel #4
0
 /**
  *  delete books
  */
 public function deleteBooks($bid)
 {
     $books = self::instance();
     $table = $books->table;
     $userStatus = Members::getCurrentUser();
     if (!$userStatus->id || !$bid) {
         return false;
     }
     return $books->where("bid = '{$bid}'")->delete();
 }
Beispiel #5
0
 /**
  * Instance construct
  */
 function __construct()
 {
     $this->rolesControl = new RolesControl();
     $this->members = Members::instance();
     $this->member_info = MemberInfo::instance();
 }