├── BBSAdmin.xcodeproj └── project.pbxproj ├── BBSAdmin ├── AppDelegate.h ├── AppDelegate.m ├── AppSettingViewController.h ├── AppSettingViewController.m ├── AppViewController.h ├── AppViewController.m ├── ArticleContentCell.h ├── ArticleContentCell.m ├── ArticleContentCell_iPad.xib ├── ArticleContentCell_iPhone.xib ├── ArticleContentEditController.h ├── ArticleContentEditController.m ├── ArticleContentViewController.h ├── ArticleContentViewController.m ├── ArticleForwardViewController.h ├── ArticleForwardViewController.m ├── ArticleInfoCell.h ├── ArticleInfoCell.m ├── ArticleInfoCell_iPad.xib ├── ArticleInfoCell_iPhone.xib ├── ArticleListViewController.h ├── ArticleListViewController.m ├── AttCache.h ├── AttCache.m ├── BBSAdmin-Info.plist ├── BBSAdmin-Prefix.pch ├── BoardDirCell.h ├── BoardDirCell.m ├── BoardDirCell_iPad.xib ├── BoardDirCell_iPhone.xib ├── BoardInfoCell.h ├── BoardInfoCell.m ├── BoardInfoCell_iPad.xib ├── BoardInfoCell_iPhone.xib ├── BoardListViewController.h ├── BoardListViewController.m ├── ContentLabel.h ├── ContentLabel.m ├── Default-568h@2x.png ├── Default.png ├── Default@2x.png ├── DiskCache.h ├── DiskCache.m ├── FontSizeCell.h ├── FontSizeCell.m ├── FontSizeCell_iPad.xib ├── FontSizeCell_iPhone.xib ├── FriendListCell.h ├── FriendListCell.m ├── FriendListCell_iPad.xib ├── FriendListCell_iPhone.xib ├── FriendListViewController.h ├── FriendListViewController.m ├── GuessInfoCell.h ├── GuessInfoCell.m ├── GuessInfoCell_iPad.xib ├── GuessInfoCell_iPhone.xib ├── GuessListViewController.h ├── GuessListViewController.m ├── GuessRegViewController.h ├── GuessRegViewController.m ├── GuessTopCell.h ├── GuessTopCell.m ├── GuessTopCell_iPad.xib ├── GuessTopCell_iPhone.xib ├── GuessTopViewController.h ├── GuessTopViewController.m ├── InfoCenter.h ├── InfoCenter.m ├── LoginBBSViewController.h ├── LoginBBSViewController.m ├── MBSelectViewController.h ├── MBSelectViewController.m ├── MatchContentViewController.h ├── MatchContentViewController.m ├── MatchHeadCell.h ├── MatchHeadCell.m ├── MatchHeadCell_iPad.xib ├── MatchHeadCell_iPhone.xib ├── MatchInfoCell.h ├── MatchInfoCell.m ├── MatchInfoCell_iPad.xib ├── MatchInfoCell_iPhone.xib ├── MatchListViewController.h ├── MatchListViewController.m ├── MatchOptionCell.h ├── MatchOptionCell.m ├── MatchOptionCell_iPad.xib ├── MatchOptionCell_iPhone.xib ├── MessageInfoCell.h ├── MessageInfoCell.m ├── MessageInfoCell_iPad.xib ├── MessageInfoCell_iPhone.xib ├── MessagesViewController.h ├── MessagesViewController.m ├── NavigationMenuView │ ├── SICellSelection.h │ ├── SICellSelection.m │ ├── SIMenuButton.h │ ├── SIMenuButton.m │ ├── SIMenuCell.h │ ├── SIMenuCell.m │ ├── SIMenuConfiguration.h │ ├── SIMenuConfiguration.m │ ├── SIMenuTable.h │ ├── SIMenuTable.m │ ├── SINavigationMenuView.h │ ├── SINavigationMenuView.m │ ├── UIColor+Extension.h │ ├── UIColor+Extension.m │ └── images │ │ ├── arrow_down.png │ │ ├── arrow_down1.png │ │ ├── arrow_down1@2x.png │ │ ├── arrow_down@2x.png │ │ ├── arrow_list.png │ │ ├── arrow_list@2x.png │ │ ├── arrow_search.png │ │ └── arrow_search@2x.png ├── ParentTabBarViewController.h ├── ParentTabBarViewController.m ├── PictureViewController.h ├── PictureViewController.m ├── ProgressBar │ ├── MBProgressHUD.h │ ├── MBProgressHUD.m │ ├── probar_tip.png │ └── probar_tip@2x.png ├── Reachability.h ├── Reachability.m ├── SectionListCell.h ├── SectionListCell.m ├── SectionListCell_iPad.xib ├── SectionListCell_iPhone.xib ├── TimelineListCell.h ├── TimelineListCell.m ├── TimelineListCell_iPad.xib ├── TimelineListCell_iPhone.xib ├── TimelineListViewController.h ├── TimelineListViewController.m ├── UIAttImageView.h ├── UIAttImageView.m ├── UIFaceImageView.h ├── UIFaceImageView.m ├── UIViewController+AppGet.h ├── UIViewController+AppGet.m ├── UserData.h ├── UserData.m ├── UserfaceCache.h ├── UserfaceCache.m ├── UserinfoCache.h ├── UserinfoCache.m ├── UserinfoHeadCell.h ├── UserinfoHeadCell.m ├── UserinfoHeadCell_iPad.xib ├── UserinfoHeadCell_iPhone.xib ├── UserinfoViewController.h ├── UserinfoViewController.m ├── app_logo.gif ├── att_loading.png ├── bar_bg.png ├── bg-blue.png ├── bg-darkblue.png ├── bg-darkblue@2x.png ├── bg-darkgray.png ├── bg-darkgray@2x.png ├── camera.png ├── cbg_ipad.png ├── cbg_iphone.png ├── client_signature.h ├── client_signature.m ├── email_inbox.png ├── email_sent.png ├── en.lproj │ ├── InfoPlist.strings │ ├── MainStoryboard_iPad.storyboard │ └── MainStoryboard_iPhone.storyboard ├── first.png ├── first@2x.png ├── guess_match.png ├── guess_mymoney.png ├── guess_top.png ├── head00.png ├── head01.png ├── head02.png ├── icon-appsetting.png ├── icon-appsetting@2x.png ├── icon-article-fire.png ├── icon-article-huo.png ├── icon-article-light.png ├── icon-article-normal.png ├── icon-article.png ├── icon-attachment.png ├── icon-hottopics.png ├── icon-hottopics@2x.png ├── icon-myfavorites.png ├── icon-myfavorites@2x.png ├── icon-reply.png ├── icon-serieplates.png ├── icon-serieplates@2x.png ├── icon-userinfo.png ├── icon-userinfo@2x.png ├── icon_back1.png ├── icon_back1@2x.png ├── icon_board.png ├── icon_board_club.png ├── icon_contact.png ├── icon_fav.png ├── icon_find.png ├── icon_friend.png ├── icon_hot.png ├── icon_member.png ├── icon_new.png ├── icon_new@2x.png ├── icon_parent.png ├── icon_search.png ├── icon_search@2x.png ├── icon_section.png ├── icon_timeline.png ├── libSMTH │ ├── SMTHURLConnection.h │ ├── libSMTH_0.2.3.a │ └── smth_netop.h ├── main.m ├── refer_article.png ├── refer_at.png ├── second.png ├── second@2x.png ├── style_bgpad00.jpg ├── style_bgpad01.jpg ├── style_bgpad02.jpg ├── style_bgpad03.jpg ├── style_bgpad06.png ├── style_bgphone00.jpg ├── style_bgphone01.jpg ├── style_bgphone02.jpg ├── style_bgphone03.jpg ├── style_bgphone04.jpg ├── style_bgphone05.jpg └── style_bgphone06.png ├── README.md ├── ipadlaunch.png ├── ipadlaunch_76.png ├── ipadlaunch_retina.png ├── iphonelaunch.png ├── iphonelaunch_152.png ├── iphonelaunch_retina.png └── iphonelaunch_retina120.png /BBSAdmin/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-3. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InfoCenter.h" 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /BBSAdmin/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-3. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ParentTabBarViewController.h" 11 | 12 | @implementation AppDelegate 13 | 14 | - (void)dealloc 15 | { 16 | //[_window release]; 17 | //[super dealloc]; 18 | } 19 | 20 | - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo 21 | { 22 | #ifdef DEBUG 23 | NSLog(@"didReceiveRemote"); 24 | #endif 25 | appSetting->unread_apns_cnt = 1; 26 | message_unread_check(false); 27 | } 28 | 29 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 30 | { 31 | [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; 32 | 33 | return YES; 34 | } 35 | 36 | - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken 37 | { 38 | #ifdef DEBUG 39 | NSLog(@"APNS token: %@", deviceToken); 40 | #endif 41 | 42 | NSString * strToken = [NSString stringWithFormat:@"%@", deviceToken]; 43 | if([strToken length] == 0){ 44 | return; 45 | } 46 | 47 | NSCharacterSet * set = [NSCharacterSet characterSetWithCharactersInString:@"<>"]; 48 | NSString * strToken1 = [strToken stringByTrimmingCharactersInSet:set]; 49 | strToken = [strToken1 stringByReplacingOccurrencesOfString:@" " withString:@""]; 50 | 51 | apiUpdateAPNS(strToken); 52 | } 53 | 54 | - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error 55 | { 56 | #ifdef DEBUG 57 | NSLog(@"APNS register fail"); 58 | #endif 59 | } 60 | 61 | - (void)applicationWillResignActive:(UIApplication *)application 62 | { 63 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 64 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 65 | #ifdef DEBUG 66 | NSLog(@"resignActive"); 67 | #endif 68 | } 69 | 70 | - (void)applicationDidEnterBackground:(UIApplication *)application 71 | { 72 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 73 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 74 | #ifdef DEBUG 75 | NSLog(@"enterBG"); 76 | #endif 77 | } 78 | 79 | - (void)applicationWillEnterForeground:(UIApplication *)application 80 | { 81 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 82 | #ifdef DEBUG 83 | NSLog(@"enterFG"); 84 | #endif 85 | } 86 | 87 | - (void)applicationDidBecomeActive:(UIApplication *)application 88 | { 89 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 90 | #ifdef DEBUG 91 | NSLog(@"didBecomeActive"); 92 | #endif 93 | if(application.applicationIconBadgeNumber != 0){ 94 | appSetting->unread_apns_cnt = 1; 95 | message_unread_check(false); 96 | 97 | application.applicationIconBadgeNumber = 0; 98 | } 99 | } 100 | 101 | - (void)applicationWillTerminate:(UIApplication *)application 102 | { 103 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 104 | } 105 | 106 | @end 107 | -------------------------------------------------------------------------------- /BBSAdmin/AppSettingViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppSettingViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-3. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InfoCenter.h" 11 | #import "AppViewController.h" 12 | 13 | @interface AppSettingViewController : AppViewController 14 | { 15 | int m_nCellWidth; 16 | int m_nCellHeightCenter; 17 | 18 | int action; 19 | } 20 | 21 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 22 | @property (strong, nonatomic) NSString *m_strAppVer; 23 | 24 | -(void)switchSettingAction:(UISwitch *)sender; 25 | 26 | -(void)showUserInfo; 27 | -(void)logoutAccount; 28 | 29 | -(void)showAbout; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /BBSAdmin/AppViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/16/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "libSMTH/SMTHURLConnection.h" 12 | 13 | @interface AppViewController : UIViewController 14 | { 15 | bool refreshed; 16 | int m_bLoadRes; 17 | MBProgressHUD *m_progressBar; 18 | 19 | SMTHURLConnection * net_smth; 20 | int net_ops; 21 | int net_ops_done; 22 | int net_ops_percent; 23 | 24 | int net_usercancel; 25 | } 26 | 27 | /* 28 | * flow: This function is called when swipe from left to right 29 | * default: [self dismissViewControllerAnimated:YES completion:nil]; 30 | * subclass: . 31 | */ 32 | - (IBAction)pressBtnBack:(id)sender; 33 | 34 | /* 35 | * default: return true;; 36 | * subclass: if want to disable scroll, return false please. 37 | */ 38 | - (bool)scroll_enabled; 39 | 40 | /* 41 | * flow: This function is called when scroll from top 42 | * default: [self loadContent]; 43 | * subclass: reset the content, and then call loadContent. 44 | */ 45 | - (void)initContent; 46 | /* 47 | * flow: This function is called when scroll from bottom 48 | * default: [self loadContent]; 49 | * subclass: increase the content, and then call loadContent. 50 | */ 51 | - (void)moreContent; 52 | /* 53 | * default: init m_progressBar; 54 | * subclass: don't overwrite this in most cases. 55 | */ 56 | -(void)loadContent; 57 | /* 58 | * flow: This function is called in loadContent() 59 | * default: do nothing; 60 | * subclass: do real network operations. 61 | */ 62 | -(void)parseContent; 63 | /* 64 | * flow: This function is called after parseContent() done. 65 | * default: do nothing; 66 | * subclass: [m_tableView reloadData] if use tableView. 67 | */ 68 | - (void)updateContent; 69 | 70 | -(void)update_unread; 71 | 72 | -(void)init_without_UI; 73 | 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /BBSAdmin/ArticleContentCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleContentCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/20/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIFaceImageView.h" 11 | #import "ContentLabel.h" 12 | 13 | @interface ArticleContentCell : UITableViewCell 14 | { 15 | int lou; 16 | NSArray * att; 17 | NSMutableArray * m_imageviews; 18 | __weak UITableView * tv; 19 | NSIndexPath * index_path; 20 | UIViewController * parent; 21 | } 22 | 23 | @property (strong, nonatomic) IBOutlet UILabel *m_labelUsr; 24 | @property (strong, nonatomic) IBOutlet UILabel *m_labelDetailInfo; 25 | @property (strong, nonatomic) IBOutlet UILabel *label_lou; 26 | @property (strong, nonatomic) IBOutlet UIFaceImageView *img_user; 27 | @property (strong, nonatomic) IBOutlet UIImageView *img_friend; 28 | @property (strong, nonatomic) IBOutlet ContentLabel *m_txtViewArtContent; 29 | @property (strong, nonatomic) IBOutlet UIView *view_bg; 30 | 31 | //public API 32 | - (void)setContentInfo:(NSString*)strHeader :(NSString*)strUsr :(NSString*)strDetailInfo :(NSString*)strContent :(int)_lou :(NSArray *)_att :(UITableView *)_tv :(NSIndexPath *)_ip :(UIViewController *)_parent; 33 | 34 | - (void)clear_image; 35 | - (CGFloat)get_height:(NSString *)body :(NSArray *)att_dict; 36 | - (void)init_fontsize; 37 | @end 38 | -------------------------------------------------------------------------------- /BBSAdmin/ArticleContentEditController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleContentEditController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/21/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "MBProgressHUD.h" 12 | #import "InfoCenter.h" 13 | #import "AppViewController.h" 14 | 15 | @interface ArticleContentEditController : AppViewController 16 | { 17 | NSString * m_lBoardId; 18 | NSString * m_lBoardName; 19 | NSDictionary * reply; 20 | 21 | bool mailmode; //reply to mail 22 | bool mail_from_article;//true: 回邮件,reply是文章, false: 回邮件,reply是邮件 23 | 24 | bool waiting_for_mbselect; 25 | 26 | //att 27 | NSString * att0_fname; 28 | } 29 | 30 | - (IBAction)pressBtSend:(id)sender; 31 | @property (strong, nonatomic) IBOutlet UILabel *m_labelBoard; 32 | @property (strong, nonatomic) IBOutlet UITextField *m_textTitle; 33 | @property (strong, nonatomic) IBOutlet UITextView *m_textCont; 34 | @property (strong, nonatomic) IBOutlet UITextField *text_mailrecv; 35 | @property (strong, nonatomic) IBOutlet UILabel *label_mailrecv; 36 | @property (strong, nonatomic) IBOutlet UIButton *btn_mbselect; 37 | @property (strong, nonatomic) IBOutlet UINavigationItem *navi; 38 | - (IBAction)pressBtnMBSelect:(id)sender; 39 | @property (strong, nonatomic) IBOutlet UIImageView *image_att; 40 | 41 | 42 | //public API 43 | /** 44 | *@ param boardid,boardname used only in !to_mail mode 45 | *@ param _mail_from_article used only in to_mail mode. 46 | */ 47 | - (void)setContentInfo:(bool)to_mail :(NSString*)boardid :(NSString*)boardname :(NSDictionary *)reply_dict :(bool)_mail_from_article; 48 | 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /BBSAdmin/ArticleContentViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleContentViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/20/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import 13 | #import "UIAttImageView.h" 14 | #import "AppViewController.h" 15 | 16 | enum ArticleContentViewMode { 17 | ArticleContentViewModeNormal = 0, 18 | ArticleContentViewModeRefer = 1, 19 | ArticleContentViewModeMail = 2, 20 | ArticleContentViewModeMailSent = 3, 21 | }; 22 | 23 | @interface ArticleContentViewController : AppViewController 24 | { 25 | NSString * m_lBoardId; 26 | NSString * m_lBoardName; 27 | long article_id; //actually it's thread_id 28 | 29 | long size; 30 | long article_cnt; //article count in normal mode 31 | 32 | enum ArticleContentViewMode mode; 33 | 34 | //refermode 35 | int refermode; 36 | int referposition; 37 | 38 | //mail 39 | int mailposition; 40 | 41 | //ActionSheet 42 | NSDictionary * reply_dict; 43 | int as_action[4]; 44 | NSIndexPath * as_indexpath; 45 | bool waiting_for_cross; 46 | NSString * cross_target; 47 | } 48 | 49 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 50 | @property (strong, nonatomic) NSMutableArray *m_mtarrayInfo; 51 | @property (strong, nonatomic) IBOutlet UINavigationItem *navi; 52 | 53 | - (IBAction)pressBtnGoboard:(id)sender; 54 | 55 | //public API 56 | /** 57 | *@ param art_mode 0:ArticleContentViewModeNormal 10:ArticleContentViewModeMail 11:ArticleContentViewModeMailSent 1,2: ArticleContentViewModeRefer 58 | */ 59 | -(void)setContentInfo:(int)art_mode :(int)art_position :(NSString *)boardid :(NSString *)boardname :(long)art_id :(long)cnt; 60 | 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /BBSAdmin/ArticleForwardViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleForwardViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/8/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InfoCenter.h" 11 | #import "AppViewController.h" 12 | 13 | 14 | @interface ArticleForwardViewController : AppViewController 15 | { 16 | NSString * m_lBoardId; 17 | NSString * m_lBoardName; 18 | NSDictionary * reply; 19 | 20 | bool dst_is_mail; //true: forward to mail, false: forward to article 21 | bool src_is_article;//true: reply是文章, false: reply是邮件 22 | } 23 | 24 | @property (strong, nonatomic) IBOutlet UILabel *label_title; 25 | @property (strong, nonatomic) IBOutlet UITextField *text_user; 26 | - (IBAction)pressBtnSend:(id)sender; 27 | 28 | //public API 29 | /** 30 | *@ param from_article 31 | */ 32 | - (void)setContentInfo:(bool)from_article :(NSString*)boardid :(NSString*)boardname :(NSDictionary *)reply_dict; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /BBSAdmin/ArticleForwardViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleForwardViewController.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/8/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "ArticleForwardViewController.h" 10 | 11 | @interface ArticleForwardViewController () 12 | 13 | @end 14 | 15 | @implementation ArticleForwardViewController 16 | @synthesize text_user,label_title; 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view. 22 | 23 | [label_title setText:[NSString stringWithFormat:@"标题: %@",[reply objectForKey:@"subject"]]]; 24 | } 25 | 26 | - (IBAction)pressBtnSend:(id)sender { 27 | [self loadContent]; 28 | } 29 | 30 | -(void)parseContent 31 | { 32 | NSString * receiver = text_user.text; 33 | if([receiver isEqualToString:@""]){ 34 | return; 35 | } 36 | 37 | if(src_is_article) { 38 | [net_smth net_ForwardArticle:m_lBoardId :[(NSString *)[reply objectForKey:@"id"] intValue] :receiver]; 39 | }else{ 40 | [net_smth net_ForwardMail:[(NSString *)[reply objectForKey:@"position"] intValue] :receiver]; 41 | } 42 | 43 | if(net_smth->net_error == 0){ 44 | m_bLoadRes = 1; 45 | } 46 | } 47 | 48 | -(void)updateContent 49 | { 50 | [self dismissViewControllerAnimated:YES completion:nil]; 51 | } 52 | 53 | -(bool)scroll_enabled 54 | { 55 | return false; 56 | } 57 | 58 | - (void)setContentInfo:(bool)from_article :(NSString*)boardid :(NSString*)boardname :(NSDictionary *)reply_dict 59 | { 60 | reply = [reply_dict mutableCopy]; 61 | src_is_article = from_article; 62 | if(from_article) { 63 | m_lBoardId = [boardid copy]; 64 | m_lBoardName = [boardname copy]; 65 | } 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /BBSAdmin/ArticleInfoCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleInfoCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIFaceImageView.h" 11 | 12 | @interface ArticleInfoCell : UITableViewCell 13 | { 14 | NSString * userid; 15 | UIViewController * parent; 16 | } 17 | @property (strong, nonatomic) IBOutlet UIImageView *image_att; 18 | @property (strong, nonatomic) IBOutlet UILabel *label_title; 19 | @property (strong, nonatomic) IBOutlet UILabel *label_author; 20 | @property (strong, nonatomic) IBOutlet UILabel *label_posttime; 21 | @property (strong, nonatomic) IBOutlet UILabel *label_replytime; 22 | @property (strong, nonatomic) IBOutlet UIFaceImageView *image_face; 23 | @property (strong, nonatomic) IBOutlet UIImageView *img_friend; 24 | @property (strong, nonatomic) IBOutlet UIImageView *img_reply; 25 | 26 | //public API 27 | /** 28 | *@ 29 | */ 30 | -(void)setContentInfo:(NSString *)title :(NSString *)author :(NSString *)posttime :(NSString *)replytime :(int)att :(int)unread :(int)ding :(int)reply_unread :(int)reply_cnt :(UIViewController *)_parent; 31 | 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /BBSAdmin/ArticleInfoCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleInfoCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "ArticleInfoCell.h" 10 | #import "UserData.h" 11 | 12 | @implementation ArticleInfoCell 13 | @synthesize label_author,label_posttime,label_replytime,label_title,image_att; 14 | @synthesize image_face, img_friend, img_reply; 15 | 16 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 17 | { 18 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 19 | if (self) { 20 | // Initialization code 21 | } 22 | return self; 23 | } 24 | 25 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 26 | { 27 | [super setSelected:selected animated:animated]; 28 | 29 | // Configure the view for the selected state 30 | } 31 | 32 | -(void)setContentInfo:(NSString *)title :(NSString *)author :(NSString *)posttime :(NSString *)replytime :(int)att :(int)unread :(int)ding :(int)reply_unread :(int)reply_cnt :(UIViewController *)_parent 33 | { 34 | parent = _parent; 35 | 36 | if(reply_cnt < 10){ 37 | }else if(reply_cnt < 100){ 38 | img_reply.image = [UIImage imageNamed:@"icon-article-light.png"]; 39 | }else if(reply_cnt < 1000){ 40 | img_reply.image = [UIImage imageNamed:@"icon-article-fire.png"]; 41 | }else{ 42 | img_reply.image = [UIImage imageNamed:@"icon-article-huo.png"]; 43 | } 44 | 45 | if(reply_unread){ 46 | label_replytime.textColor = [UIColor redColor]; 47 | } 48 | 49 | if(!att){ 50 | [image_att removeFromSuperview]; 51 | } 52 | if(ding){ 53 | label_title.textColor = [UIColor redColor]; 54 | [label_title setFont:[UIFont fontWithName:@"Helvetica-Bold" size:16]]; 55 | } 56 | if(unread){ 57 | label_posttime.textColor = [UIColor redColor]; 58 | } 59 | 60 | [label_replytime setText:replytime]; 61 | [label_posttime setText:posttime]; 62 | 63 | userid = [author copy]; 64 | [label_author setText:author]; 65 | 66 | NSRange t_range = [userid rangeOfString:@"."]; 67 | if(t_range.location == NSNotFound){ 68 | //if 'author' contain '.', means 转信 69 | [image_face setContentInfo:userid :1 :parent]; 70 | if(! apiGetUserData_is_friends(userid)){ 71 | [img_friend setHidden:YES]; 72 | }else{ 73 | [img_friend setHidden:NO]; 74 | } 75 | } 76 | 77 | [label_title setText:title]; 78 | } 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /BBSAdmin/ArticleListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleListViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/16/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import "ArticleInfoCell.h" 13 | #import "AppViewController.h" 14 | #import "NavigationMenuView/SINavigationMenuView.h" 15 | 16 | enum ArticleListMode { 17 | ArticleListModeNormal = 0, 18 | ArticleListModeHot = 1, 19 | ArticleListModeRefer = 2, 20 | ArticleListModeMail = 3, 21 | ArticleListModeMailSent = 4, 22 | }; 23 | 24 | @interface ArticleListViewController : AppViewController 25 | { 26 | NSString * m_lBoardId; 27 | NSString * m_lBoardName; 28 | long articles_cnt; 29 | long from; 30 | long size; 31 | long load_size; 32 | int load_init_mode; 33 | 34 | enum ArticleListMode mode; 35 | 36 | //search submode 37 | bool submode_search; 38 | BOOL in_search; 39 | UITapGestureRecognizer * tap; 40 | NSString * query_title; 41 | NSString * query_user; 42 | 43 | //hotmode 44 | SINavigationMenuView * menu; 45 | int hotmode_section; 46 | NSArray * menu_items; 47 | 48 | //refermode 49 | int refermode; 50 | 51 | //current date 52 | NSTimeInterval cur_time; 53 | long long int last_read_artid; 54 | 55 | //as mode 56 | int as_mode; 57 | } 58 | 59 | @property (strong, nonatomic) IBOutlet UINavigationItem *navi; 60 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 61 | @property (strong, nonatomic) NSMutableArray *m_mtarrayInfo; 62 | @property (strong, nonatomic) IBOutlet UIBarButtonItem *buttonNewArt; 63 | @property (strong, nonatomic) IBOutlet UISearchBar *searchbar; 64 | 65 | - (IBAction)pressBtnBack:(id)sender; 66 | - (IBAction)pressBtNewArt:(id)sender; 67 | 68 | -(void)setHotmode:(int)section; 69 | -(void)setBoardArticleMode:(NSString *)boardid :(NSString *)boardname; 70 | -(void)setRefermode:(int)refer_submode; 71 | -(void)setMailmode:(int)sent; 72 | 73 | - (void)search_title:(NSString *)_query; 74 | - (void)search_user:(NSString *)_query; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /BBSAdmin/AttCache.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "InfoCenter.h" 3 | #import "DiskCache.h" 4 | 5 | @interface AttCache : DiskCache 6 | 7 | + (AttCache *) sharedCache; 8 | 9 | - (UIImage *) getImage:(NSString *)key :(int)size; 10 | - (void) addImage:(NSData *)_data :(NSString *)key :(int)size; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /BBSAdmin/AttCache.m: -------------------------------------------------------------------------------- 1 | #import "AttCache.h" 2 | 3 | 4 | @implementation AttCache 5 | 6 | + (AttCache *) sharedCache 7 | { 8 | static dispatch_once_t once; 9 | static id instance; 10 | 11 | dispatch_once(&once, ^{ 12 | instance = [self new]; 13 | [instance init_with_diskpath:@"ImageCache" :0]; 14 | }); 15 | 16 | return instance; 17 | } 18 | 19 | - (NSString *) key_with_size:(NSString *)key :(int)size 20 | { 21 | return [NSString stringWithFormat:@"%@_%d", key, size];; 22 | } 23 | 24 | - (UIImage *) getImage_fixsize:(NSString *)key :(int)size 25 | { 26 | NSString * realkey = [self key_with_size:key :size]; 27 | 28 | NSData * data = [self get_data:realkey]; 29 | if(data){ 30 | UIImage * t = [UIImage imageWithData:data] ; 31 | if(t != nil){ 32 | return t; 33 | } 34 | } 35 | 36 | return nil; 37 | } 38 | 39 | - (UIImage *) getImage:(NSString *)key :(int)size 40 | { 41 | UIImage * t = [self getImage_fixsize:key :size]; 42 | if(t != nil){ 43 | return t; 44 | } 45 | //find large resolution 46 | if(size == 1){ 47 | return nil; 48 | } 49 | t = [self getImage_fixsize:key :1]; 50 | if(t != nil){ 51 | return t; 52 | } 53 | 54 | if(size == 2){ 55 | return nil; 56 | } 57 | t = [self getImage_fixsize:key :2]; 58 | if(t != nil){ 59 | return t; 60 | } 61 | 62 | return nil; 63 | } 64 | 65 | - (void) addImage:(NSData *)_data :(NSString *)key :(int)size 66 | { 67 | NSString * realkey = [self key_with_size:key :size]; 68 | 69 | //add to memCache 70 | [self add_data:_data :realkey]; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /BBSAdmin/BBSAdmin-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIcons 12 | 13 | CFBundlePrimaryIcon 14 | 15 | CFBundleIconFiles 16 | 17 | iphonelaunch_retina120 18 | iphonelaunch_retina 19 | iphonelaunch.png 20 | iphonelaunch_retina.png 21 | ipadlaunch.png 22 | ipadlaunch_retina.png 23 | 24 | 25 | 26 | CFBundleIcons~ipad 27 | 28 | CFBundlePrimaryIcon 29 | 30 | CFBundleIconFiles 31 | 32 | iphonelaunch_152 33 | ipadlaunch_76 34 | iphonelaunch_retina120 35 | iphonelaunch_retina 36 | iphonelaunch.png 37 | iphonelaunch_retina.png 38 | ipadlaunch.png 39 | ipadlaunch_retina.png 40 | 41 | 42 | 43 | CFBundleIdentifier 44 | net.newsmth.${PRODUCT_NAME:rfc1034identifier} 45 | CFBundleInfoDictionaryVersion 46 | 6.0 47 | CFBundleName 48 | ${PRODUCT_NAME} 49 | CFBundlePackageType 50 | APPL 51 | CFBundleShortVersionString 52 | 0.2.3 53 | CFBundleSignature 54 | ???? 55 | CFBundleVersion 56 | 0.2.3 57 | LSRequiresIPhoneOS 58 | 59 | UIMainStoryboardFile 60 | MainStoryboard_iPhone 61 | UIMainStoryboardFile~ipad 62 | MainStoryboard_iPad 63 | UIRequiredDeviceCapabilities 64 | 65 | armv7 66 | 67 | UIStatusBarTintParameters 68 | 69 | UINavigationBar 70 | 71 | Style 72 | UIBarStyleDefault 73 | Translucent 74 | 75 | 76 | 77 | UISupportedInterfaceOrientations 78 | 79 | UIInterfaceOrientationPortrait 80 | UIInterfaceOrientationPortraitUpsideDown 81 | 82 | UISupportedInterfaceOrientations~ipad 83 | 84 | UIInterfaceOrientationLandscapeLeft 85 | UIInterfaceOrientationLandscapeRight 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /BBSAdmin/BBSAdmin-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BBSAdmin' target in the 'BBSAdmin' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /BBSAdmin/BoardDirCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // BoardDirCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BoardDirCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UILabel *label_name; 13 | @property (strong, nonatomic) IBOutlet UILabel *label_desc; 14 | 15 | //public API 16 | -(void)setContentInfo:(NSString*)name; 17 | @end 18 | -------------------------------------------------------------------------------- /BBSAdmin/BoardDirCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // BoardDirCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "BoardDirCell.h" 10 | 11 | @implementation BoardDirCell 12 | @synthesize label_name,label_desc; 13 | 14 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 15 | { 16 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 17 | if (self) { 18 | // Initialization code 19 | } 20 | return self; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 24 | { 25 | [super setSelected:selected animated:animated]; 26 | 27 | // Configure the view for the selected state 28 | } 29 | 30 | -(void)setContentInfo:(NSString*)name 31 | { 32 | //替换中文空格为英文空格 33 | NSString * ename = [name stringByReplacingOccurrencesOfString:@" " withString:@" "]; 34 | 35 | NSRange r = [ename rangeOfString:@" "]; 36 | if(r.location == NSNotFound){ 37 | [label_name setText:ename]; 38 | [label_desc setText:@""]; 39 | return; 40 | } 41 | 42 | NSString * info = [ename substringToIndex:r.location]; 43 | int i = (int)r.location + 1; 44 | for(; i < [ename length] && [ename characterAtIndex:i] == ' '; i++); 45 | NSString * detail; 46 | if(i >= [ename length]){ 47 | detail = @""; 48 | }else{ 49 | detail = [ename substringFromIndex:i]; 50 | } 51 | [label_name setText:info]; 52 | [label_desc setText:detail]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /BBSAdmin/BoardDirCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /BBSAdmin/BoardDirCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /BBSAdmin/BoardInfoCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // BoardInfoCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BoardInfoCell : UITableViewCell 12 | 13 | @property (strong, nonatomic) IBOutlet UILabel *label_name; 14 | @property (strong, nonatomic) IBOutlet UILabel *label_desc; 15 | @property (strong, nonatomic) IBOutlet UILabel *label_article; 16 | @property (strong, nonatomic) IBOutlet UILabel *label_online; 17 | @property (strong, nonatomic) IBOutlet UIImageView *img_board; 18 | 19 | //public API 20 | -(void)setContentInfo:(NSString *)name :(NSString *)desc :(int)article :(int)online :(int)unread :(long)flag; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /BBSAdmin/BoardInfoCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // BoardInfoCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "BoardInfoCell.h" 10 | 11 | @implementation BoardInfoCell 12 | @synthesize label_article,label_desc,label_name,label_online; 13 | @synthesize img_board; 14 | 15 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 16 | { 17 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | 24 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 25 | { 26 | [super setSelected:selected animated:animated]; 27 | 28 | // Configure the view for the selected state 29 | } 30 | 31 | -(void)setContentInfo:(NSString *)name :(NSString *)desc :(int)article :(int)online :(int)unread :(long)flag 32 | { 33 | [label_name setText:name]; 34 | [label_desc setText:desc]; 35 | [label_online setText:[NSString stringWithFormat:@"%d",online]]; 36 | [label_article setText:[NSString stringWithFormat:@"%d", article]]; 37 | if(unread){ 38 | label_article.textColor = [UIColor redColor]; 39 | } 40 | if(flag & 0x1c0){ 41 | //club 42 | img_board.image = [UIImage imageNamed:@"icon_board_club.png"]; 43 | } 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BBSAdmin/BoardListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BoardListViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-3. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InfoCenter.h" 11 | #import "MBProgressHUD.h" 12 | #import 13 | #import "BoardInfoCell.h" 14 | #import "BoardDirCell.h" 15 | #import "AppViewController.h" 16 | 17 | 18 | @interface BoardListViewController : AppViewController 19 | { 20 | int m_mode; //1:新分类讨论区, 2:个人收藏夹,3:分区十大, 4:搜索版面, 5:驻版列表 21 | NSMutableArray * m_mtarraySectionId; 22 | NSMutableArray * m_mtarrayGroupId; 23 | 24 | NSString * query; 25 | 26 | //as_param 27 | NSString * as_bname; 28 | int as_mode; 29 | NSIndexPath * as_indexpath; 30 | 31 | bool mode_subdir; 32 | } 33 | 34 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 35 | @property (strong, nonatomic) NSMutableArray *m_mtarrayInfo; 36 | - (IBAction)pressBtnBack:(id)sender; 37 | 38 | 39 | //public API 40 | /** 41 | *@ param _mmode 1:新分类讨论区, 2:个人收藏夹,3:分区十大, 4:搜索版面, 5:驻版列表 42 | *@ param _query only used if '_mmode'==4 43 | *@ 44 | */ 45 | - (void)setContentInfo:(int)_mmode :(NSString *)_query; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /BBSAdmin/ContentLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // ContentLabel.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 3/17/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ContentLabel : UILabel 13 | { 14 | NSMutableAttributedString *attString; 15 | bool prev_line_empty; 16 | } 17 | 18 | - (void)setContentInfo:(NSString *)text; 19 | - (CGFloat)get_height; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /BBSAdmin/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/Default-568h@2x.png -------------------------------------------------------------------------------- /BBSAdmin/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/Default.png -------------------------------------------------------------------------------- /BBSAdmin/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/Default@2x.png -------------------------------------------------------------------------------- /BBSAdmin/DiskCache.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "InfoCenter.h" 3 | 4 | @interface DiskCache : NSObject 5 | 6 | @property (strong, nonatomic) NSCache * memCache; 7 | @property (strong, nonatomic) NSString *diskCachePath; 8 | //key_subdir: if 1, file will be ROOT/disk_path/KEY[0]/key 9 | //if 0, file will be ROOT/disk_path/USERID/key 10 | @property (nonatomic) int key_subdir; 11 | 12 | - (void) init_with_diskpath:(NSString *)disk_path :(int)_subdir; 13 | 14 | - (void) add_data:(id)data :(NSString *)key; 15 | - (id) get_data:(NSString *)key; 16 | 17 | - (void) clear_cache; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /BBSAdmin/DiskCache.m: -------------------------------------------------------------------------------- 1 | #import "UIAttImageView.h" 2 | #import "DiskCache.h" 3 | 4 | @implementation DiskCache 5 | 6 | @synthesize memCache; 7 | @synthesize diskCachePath; 8 | @synthesize key_subdir; 9 | 10 | - (void) init_with_diskpath:(NSString *)disk_path :(int)_subdir 11 | { 12 | key_subdir = _subdir; 13 | 14 | memCache = [[NSCache alloc] init]; 15 | if(key_subdir){ 16 | memCache.name = [NSString stringWithFormat:@"net.newsmth.SMTH.%@", disk_path]; 17 | }else{ 18 | memCache.name = [NSString stringWithFormat:@"net.newsmth.SMTH.%@.%@", disk_path, [appSetting getLoginInfoUsr]]; 19 | } 20 | 21 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); 22 | diskCachePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:disk_path]; 23 | 24 | if (![[NSFileManager defaultManager] fileExistsAtPath:diskCachePath]) { 25 | NSError *error = nil; 26 | [[NSFileManager defaultManager] createDirectoryAtPath:diskCachePath 27 | withIntermediateDirectories:YES 28 | attributes:nil 29 | error:&error]; 30 | } 31 | 32 | 33 | return; 34 | } 35 | 36 | - (NSString *) get_disk_path:(NSString *)key 37 | { 38 | NSString *localUserPath; 39 | 40 | if(key_subdir){ 41 | NSString * k0 = [[key substringToIndex:1] uppercaseString]; 42 | localUserPath = [diskCachePath stringByAppendingPathComponent:k0]; 43 | }else{ 44 | localUserPath = [diskCachePath stringByAppendingPathComponent:[appSetting getLoginInfoUsr]]; 45 | } 46 | 47 | if (![[NSFileManager defaultManager] fileExistsAtPath:localUserPath]) { 48 | NSError *error = nil; 49 | [[NSFileManager defaultManager] createDirectoryAtPath:localUserPath 50 | withIntermediateDirectories:YES 51 | attributes:nil 52 | error:&error]; 53 | } 54 | 55 | return [localUserPath stringByAppendingPathComponent:key]; 56 | } 57 | 58 | - (void) clear_mem_cache 59 | { 60 | [memCache removeAllObjects]; 61 | } 62 | 63 | - (void) clear_disk_cache 64 | { 65 | NSError *error = nil; 66 | [[NSFileManager defaultManager] removeItemAtPath:diskCachePath error:&error]; 67 | } 68 | 69 | - (void) clear_cache 70 | { 71 | [self clear_mem_cache]; 72 | [self clear_disk_cache]; 73 | } 74 | 75 | - (id) get_data:(NSString *)key 76 | { 77 | //first get image from memcache 78 | id t = [memCache objectForKey:key]; 79 | if(t != nil){ 80 | return t; 81 | } 82 | 83 | //then get from Disk 84 | NSString * localPath = [self get_disk_path:key]; 85 | if (![[NSFileManager defaultManager] fileExistsAtPath:localPath]) { 86 | return nil; 87 | } 88 | 89 | t = [NSData dataWithContentsOfFile:localPath]; 90 | if(t == nil){ 91 | return nil; 92 | } 93 | 94 | //save the data to memcache 95 | [self add_data_mem:t :key]; 96 | 97 | #ifdef DEBUG 98 | //NSLog(@"diskcache from disk:%@ %@", localPath, key); 99 | #endif 100 | return t; 101 | } 102 | 103 | - (void) add_data_mem:(id)data :(NSString *)key 104 | { 105 | [memCache setObject:data forKey:key]; 106 | } 107 | 108 | - (void) add_data:(id)data :(NSString *)key 109 | { 110 | //add to memCache 111 | [self add_data_mem:data :key]; 112 | 113 | //add to disk 114 | NSString * localPath = [self get_disk_path:key]; 115 | 116 | [(NSData *)data writeToFile:localPath atomically:NSAtomicWrite]; 117 | 118 | #ifdef DEBUG 119 | if([(NSData *)data length]){ 120 | NSLog(@"attcache to disk:%@ %@ %lu", localPath, key, (unsigned long)[(NSData *)data length]); 121 | } 122 | #endif 123 | } 124 | @end 125 | -------------------------------------------------------------------------------- /BBSAdmin/FontSizeCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FontSizeCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 3/4/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FontSizeCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UILabel *label_txt; 13 | @property (strong, nonatomic) IBOutlet UISlider *slider_size; 14 | 15 | -(void)loadFontSize; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /BBSAdmin/FontSizeCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FontSizeCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 3/4/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "FontSizeCell.h" 10 | #import "InfoCenter.h" 11 | 12 | @implementation FontSizeCell 13 | @synthesize label_txt,slider_size; 14 | 15 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 16 | { 17 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | 24 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 25 | { 26 | [super setSelected:selected animated:animated]; 27 | 28 | // Configure the view for the selected state 29 | } 30 | 31 | -(void)set_label 32 | { 33 | label_txt.text = [NSString stringWithFormat:@"文章字体 [%d号]",appSetting->font_size]; 34 | label_txt.font = [UIFont fontWithName:@"Helvetica Neue" size:appSetting->font_size]; 35 | } 36 | 37 | -(void)loadFontSize 38 | { 39 | [self set_label]; 40 | 41 | slider_size.value = appSetting->font_size; 42 | 43 | [slider_size addTarget:self action:@selector(fontChanged:) forControlEvents:UIControlEventValueChanged]; 44 | } 45 | 46 | -(void)fontChanged:(UISlider *)sender 47 | { 48 | int newv = sender.value; 49 | 50 | if(newv == appSetting->font_size){ 51 | return; 52 | } 53 | 54 | appSetting->font_size = newv; 55 | #ifdef DEBUG 56 | NSLog(@"fontsize:%d", newv); 57 | #endif 58 | 59 | [self set_label]; 60 | 61 | [appSetting appSettingChange:@"font_size" :[NSString stringWithFormat:@"%d",appSetting->font_size]]; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /BBSAdmin/FontSizeCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /BBSAdmin/FontSizeCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /BBSAdmin/FriendListCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FriendListCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/28/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIFaceImageView.h" 11 | 12 | @interface FriendListCell : UITableViewCell 13 | @property (strong, nonatomic) IBOutlet UILabel *label_userid; 14 | @property (strong, nonatomic) IBOutlet UIFaceImageView *img_user; 15 | 16 | -(void)setContentInfo:(NSString *)userid; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /BBSAdmin/FriendListCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FriendListCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/28/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "FriendListCell.h" 10 | 11 | @implementation FriendListCell 12 | @synthesize label_userid,img_user; 13 | 14 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 15 | { 16 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 17 | if (self) { 18 | // Initialization code 19 | } 20 | return self; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 24 | { 25 | [super setSelected:selected animated:animated]; 26 | 27 | // Configure the view for the selected state 28 | } 29 | 30 | -(void)setContentInfo:(NSString *)userid 31 | { 32 | [label_userid setText:userid]; 33 | 34 | [img_user setContentInfo:userid :0 :Nil]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /BBSAdmin/FriendListCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BBSAdmin/FriendListCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BBSAdmin/FriendListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FriendListViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/28/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "AppViewController.h" 10 | 11 | @interface FriendListViewController : AppViewController 12 | { 13 | bool force_update; 14 | } 15 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 16 | @property (strong, nonatomic) NSMutableArray *m_mtarrayInfo; 17 | 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /BBSAdmin/FriendListViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FriendListViewController.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/28/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "FriendListViewController.h" 10 | #import "UserData.h" 11 | #import "UserinfoViewController.h" 12 | #import "UIViewController+AppGet.h" 13 | #import "FriendListCell.h" 14 | 15 | @interface FriendListViewController () 16 | 17 | @end 18 | 19 | @implementation FriendListViewController 20 | @synthesize m_tableView; 21 | @synthesize m_mtarrayInfo; 22 | 23 | - (void)viewDidLoad 24 | { 25 | [super viewDidLoad]; 26 | // Do any additional setup after loading the view. 27 | 28 | m_mtarrayInfo = [[NSMutableArray alloc] initWithCapacity:10]; 29 | force_update = NO; 30 | [self loadContent]; 31 | } 32 | 33 | - (void)parseContent 34 | { 35 | NSDictionary * list = apiGetUserData_friends(); 36 | 37 | [m_mtarrayInfo removeAllObjects]; 38 | for(NSString * key in list){ 39 | [m_mtarrayInfo addObject:key]; 40 | } 41 | 42 | //sort m_mtarrayInfo 43 | [m_mtarrayInfo sortUsingComparator:^(id first, id second){ 44 | NSString * p1 = (NSString *)first; 45 | NSString * p2 = (NSString *)second; 46 | 47 | return [p1 caseInsensitiveCompare:p2]; 48 | }]; 49 | 50 | m_bLoadRes = 1; 51 | } 52 | 53 | #pragma mark - UITableView Data Source 54 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 55 | { 56 | return 1; 57 | } 58 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 59 | { 60 | return [m_mtarrayInfo count]; 61 | } 62 | 63 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 64 | { 65 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad){ 66 | return 54.0f; 67 | }else{ 68 | return 40.0f; 69 | } 70 | } 71 | 72 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 73 | { 74 | if(1){ 75 | static NSString *cellId; 76 | 77 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) 78 | cellId = @"FriendListCell_iPad"; 79 | else 80 | cellId = @"FriendListCell_iPhone"; 81 | FriendListCell *cell = (FriendListCell*)[self.m_tableView dequeueReusableCellWithIdentifier:cellId]; 82 | if (cell == nil) { 83 | NSArray *nibArray = [[NSBundle mainBundle] loadNibNamed:cellId owner:self options:nil]; 84 | cell = (FriendListCell*)[nibArray objectAtIndex:0]; 85 | } 86 | 87 | //set cell 88 | [cell setBackgroundColor:[UIColor clearColor]]; 89 | 90 | NSString * userid = [m_mtarrayInfo objectAtIndex:indexPath.row]; 91 | 92 | [cell setContentInfo:userid]; 93 | 94 | return cell; 95 | } 96 | } 97 | 98 | - (void)moreContent 99 | { 100 | //disable more option 101 | } 102 | 103 | - (bool)scroll_enabled 104 | { 105 | return false; 106 | } 107 | 108 | #pragma mark - Table view delegate 109 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 110 | { 111 | NSString * userid = [m_mtarrayInfo objectAtIndex:indexPath.row]; 112 | 113 | UserinfoViewController *UserinfoViewController = [UIViewController appGetView:@"UserinfoViewController"]; 114 | 115 | [UserinfoViewController setContentInfo:userid]; 116 | [self presentViewController:UserinfoViewController animated:YES completion:nil]; 117 | } 118 | 119 | - (void)updateContent 120 | { 121 | [m_tableView reloadData]; 122 | } 123 | @end 124 | -------------------------------------------------------------------------------- /BBSAdmin/GuessInfoCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // GuessInfoCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/30/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GuessInfoCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UILabel *label_name; 13 | 14 | -(void)setContentInfo:(NSString*)name; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /BBSAdmin/GuessInfoCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // GuessInfoCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/30/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "GuessInfoCell.h" 10 | 11 | @implementation GuessInfoCell 12 | @synthesize label_name; 13 | 14 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 15 | { 16 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 17 | if (self) { 18 | // Initialization code 19 | } 20 | return self; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 24 | { 25 | [super setSelected:selected animated:animated]; 26 | 27 | // Configure the view for the selected state 28 | } 29 | 30 | -(void)setContentInfo:(NSString*)name 31 | { 32 | [label_name setText:name]; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /BBSAdmin/GuessInfoCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /BBSAdmin/GuessInfoCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /BBSAdmin/GuessListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GuessListViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/30/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import "GuessInfoCell.h" 13 | #import 14 | #import "AppViewController.h" 15 | 16 | @interface GuessListViewController : AppViewController 17 | { 18 | } 19 | 20 | @property (strong, nonatomic) NSMutableArray *m_mtarrayInfo; 21 | 22 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /BBSAdmin/GuessListViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GuessListViewController.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/30/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "GuessListViewController.h" 10 | #import "MatchListViewController.h" 11 | #import "UIViewController+AppGet.h" 12 | 13 | @interface GuessListViewController () 14 | 15 | @end 16 | 17 | @implementation GuessListViewController 18 | @synthesize m_tableView; 19 | @synthesize m_mtarrayInfo; 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | // Do any additional setup after loading the view. 25 | m_mtarrayInfo = [NSMutableArray arrayWithCapacity:10]; 26 | 27 | [self loadContent]; 28 | } 29 | 30 | -(void)parseContent 31 | { 32 | NSArray * arrayInfo = [net_smth net_ListGuess]; 33 | 34 | if(net_smth->net_error == 0){ 35 | m_bLoadRes = 1; 36 | [m_mtarrayInfo removeAllObjects]; 37 | [m_mtarrayInfo addObjectsFromArray:arrayInfo]; 38 | } 39 | } 40 | 41 | - (IBAction)pressBtnBack:(id)sender 42 | { 43 | //no back 44 | return; 45 | } 46 | 47 | -(void)moreContent 48 | { 49 | //disable more option 50 | } 51 | 52 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 53 | { 54 | return 1; 55 | } 56 | 57 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 58 | { 59 | return [m_mtarrayInfo count] + 1; 60 | } 61 | 62 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 63 | { 64 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) 65 | return 64.0f; 66 | else 67 | return 54.0f; 68 | } 69 | 70 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 71 | { 72 | static NSString *root_cellId; 73 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) 74 | root_cellId = @"GuessInfoCell_iPad"; 75 | else 76 | root_cellId = @"GuessInfoCell_iPhone"; 77 | GuessInfoCell *cell = (GuessInfoCell*)[self.m_tableView dequeueReusableCellWithIdentifier:root_cellId]; 78 | if (cell == nil) { 79 | NSArray *nibArray = [[NSBundle mainBundle] loadNibNamed:root_cellId owner:self options:nil]; 80 | cell = (GuessInfoCell*)[nibArray objectAtIndex:0]; 81 | } 82 | 83 | [cell setBackgroundColor:[UIColor clearColor]]; 84 | 85 | if(indexPath.row == 0){ 86 | [cell setContentInfo:@"----所有进行中的竞猜----"]; 87 | }else{ 88 | NSDictionary * dict = nil; 89 | if(indexPath.row <= [m_mtarrayInfo count]){ 90 | dict = [m_mtarrayInfo objectAtIndex:(indexPath.row - 1)]; 91 | } 92 | if(dict) { 93 | [cell setContentInfo:[dict objectForKey:@"name"]]; 94 | }else{ 95 | [cell setContentInfo:@"--------"]; 96 | } 97 | } 98 | 99 | return cell; 100 | 101 | } 102 | 103 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 104 | { 105 | if(indexPath.row == 0){ 106 | [self showGuess:-1]; 107 | }else{ 108 | NSDictionary * dict = [m_mtarrayInfo objectAtIndex:(indexPath.row - 1)]; 109 | 110 | [self showGuess:[(NSString *)[dict objectForKey:@"id"] intValue]]; 111 | } 112 | } 113 | 114 | -(void)showGuess:(int)guessid 115 | { 116 | MatchListViewController *matchlistViewController = [UIViewController appGetView:@"MatchListViewController"]; 117 | 118 | if(guessid == -1){ 119 | [matchlistViewController setContentInfo:0 :1]; 120 | }else{ 121 | [matchlistViewController setContentInfo:guessid :0]; 122 | } 123 | 124 | [self presentViewController:matchlistViewController animated:YES completion:nil]; 125 | } 126 | 127 | -(void)updateContent 128 | { 129 | [m_tableView reloadData]; 130 | } 131 | 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /BBSAdmin/GuessRegViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GuessRegViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/4/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import "AppViewController.h" 13 | 14 | @interface GuessRegViewController : AppViewController 15 | { 16 | NSString * userid; 17 | int guessid; 18 | } 19 | @property (strong, nonatomic) IBOutlet UILabel *label_userid; 20 | @property (strong, nonatomic) IBOutlet UITextField *text_realname; 21 | @property (strong, nonatomic) IBOutlet UITextField *text_phone; 22 | - (IBAction)pressBtnReg:(id)sender; 23 | 24 | -(void)setContentInfo:(int)_guessid :(NSString *)_userid; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /BBSAdmin/GuessRegViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GuessRegViewController.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/4/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "GuessRegViewController.h" 10 | 11 | @interface GuessRegViewController () 12 | 13 | @end 14 | 15 | @implementation GuessRegViewController 16 | @synthesize label_userid, text_phone, text_realname; 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view. 22 | 23 | [label_userid setText:[NSString stringWithFormat:@"用户名: %@", userid]]; 24 | } 25 | 26 | - (bool)scroll_enabled 27 | { 28 | return false; 29 | } 30 | 31 | - (IBAction)pressBtnReg:(id)sender { 32 | [self loadContent]; 33 | } 34 | 35 | - (void)parseContent 36 | { 37 | if([text_realname.text length] <= 0 || [text_phone.text length] <= 4){ 38 | UIAlertView *altview = [[UIAlertView alloc]initWithTitle:@"错误" message:[NSString stringWithFormat:@"真实姓名和电话号码必须填写"] delegate:nil cancelButtonTitle:@"更改" otherButtonTitles:nil]; 39 | [altview show]; 40 | return; 41 | } 42 | int ret = [net_smth net_RegGuess:guessid :text_realname.text :text_phone.text]; 43 | if(net_smth->net_error != 0 || ret != 0){ 44 | UIAlertView *altview = [[UIAlertView alloc]initWithTitle:@"错误" message:[NSString stringWithFormat:@"系统出错"] delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil]; 45 | [altview show]; 46 | return; 47 | }else{ 48 | m_bLoadRes = 1; 49 | } 50 | } 51 | 52 | - (void)updateContent 53 | { 54 | [self dismissViewControllerAnimated:YES completion:nil]; 55 | } 56 | 57 | -(void)setContentInfo:(int)_guessid :(NSString *)_userid 58 | { 59 | userid = [_userid copy]; 60 | guessid = _guessid; 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /BBSAdmin/GuessTopCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // GuessTopCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/9/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GuessTopCell : UITableViewCell 12 | { 13 | } 14 | 15 | @property (strong, nonatomic) IBOutlet UILabel *label_rank; 16 | @property (strong, nonatomic) IBOutlet UILabel *label_userid; 17 | @property (strong, nonatomic) IBOutlet UILabel *label_money; 18 | @property (strong, nonatomic) IBOutlet UILabel *label_match; 19 | 20 | 21 | -(void)setContentInfo:(NSDictionary *)rank; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /BBSAdmin/GuessTopCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // GuessTopCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/9/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "GuessTopCell.h" 10 | 11 | @implementation GuessTopCell 12 | @synthesize label_match,label_money,label_rank,label_userid; 13 | 14 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 15 | { 16 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 17 | if (self) { 18 | // Initialization code 19 | } 20 | return self; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 24 | { 25 | [super setSelected:selected animated:animated]; 26 | 27 | // Configure the view for the selected state 28 | } 29 | 30 | -(void)setContentInfo:(NSDictionary *)rank 31 | { 32 | [label_rank setText:[NSString stringWithFormat:@"(%d)", [(NSString *)[rank objectForKey:@"rank"] intValue]]]; 33 | [label_userid setText:[rank objectForKey:@"userid"]]; 34 | int winmoney = [(NSString *)[rank objectForKey:@"money_win"] intValue]; 35 | int total = [(NSString *)[rank objectForKey:@"money_in"] intValue]; 36 | NSString * winstr; 37 | if(winmoney >= 0){ 38 | winstr = @"赢"; 39 | }else{ 40 | winstr = @"输"; 41 | } 42 | int percent; 43 | if(total == 0){ 44 | percent = 0; 45 | }else{ 46 | percent = winmoney * 100 / total; 47 | } 48 | [label_money setText:[NSString stringWithFormat:@"%@%d分(投%d分,%d%%回报)",winstr,(winmoney >= 0 ? winmoney : 0 - winmoney),total, percent] ]; 49 | 50 | int m_win = [(NSString *)[rank objectForKey:@"match_win"] intValue]; 51 | int m_all = [(NSString *)[rank objectForKey:@"match_in"] intValue]; 52 | if(m_all == 0){ 53 | percent = 0; 54 | }else{ 55 | percent = m_win * 100 / m_all; 56 | } 57 | [label_match setText:[NSString stringWithFormat:@"赢%d场(共%d场,%d%%胜)",m_win, m_all, percent]]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /BBSAdmin/GuessTopCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 31 | 37 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /BBSAdmin/GuessTopCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 31 | 37 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /BBSAdmin/GuessTopViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GuessTopViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/9/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import "GuessTopCell.h" 13 | #import "AppViewController.h" 14 | 15 | @interface GuessTopViewController : AppViewController 16 | { 17 | int guessid; 18 | } 19 | 20 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 21 | 22 | @property (strong, nonatomic) NSMutableArray *m_mtarrayInfo; 23 | 24 | 25 | - (void)setContentInfo:(int)_guessid; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /BBSAdmin/GuessTopViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GuessTopViewController.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/9/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "GuessTopViewController.h" 10 | 11 | @interface GuessTopViewController () 12 | 13 | @end 14 | 15 | @implementation GuessTopViewController 16 | @synthesize m_mtarrayInfo, m_tableView; 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view. 22 | 23 | m_mtarrayInfo = [NSMutableArray arrayWithCapacity:10]; 24 | 25 | [self loadContent]; 26 | } 27 | 28 | -(void)parseContent 29 | { 30 | NSArray * top = [net_smth net_ListGuessTop:guessid]; 31 | if(net_smth->net_error == 0){ 32 | m_bLoadRes = 1; 33 | 34 | [m_mtarrayInfo removeAllObjects]; 35 | [m_mtarrayInfo addObjectsFromArray:top]; 36 | } 37 | } 38 | 39 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 40 | { 41 | return 1; 42 | } 43 | 44 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 45 | { 46 | return [m_mtarrayInfo count]; 47 | } 48 | 49 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 50 | { 51 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) 52 | return 64.0f; 53 | else 54 | return 54.0f; 55 | } 56 | 57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 58 | { 59 | static NSString *root_cellId; 60 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) 61 | root_cellId = @"GuessTopCell_iPad"; 62 | else 63 | root_cellId = @"GuessTopCell_iPhone"; 64 | GuessTopCell *cell = (GuessTopCell*)[self.m_tableView dequeueReusableCellWithIdentifier:root_cellId]; 65 | if (cell == nil) { 66 | NSArray *nibArray = [[NSBundle mainBundle] loadNibNamed:root_cellId owner:self options:nil]; 67 | cell = (GuessTopCell*)[nibArray objectAtIndex:0]; 68 | } 69 | 70 | [cell setBackgroundColor:[UIColor clearColor]]; 71 | 72 | [cell setContentInfo:[m_mtarrayInfo objectAtIndex:(indexPath.row)]]; 73 | 74 | return cell; 75 | 76 | } 77 | 78 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 79 | { 80 | } 81 | 82 | - (void)updateContent 83 | { 84 | [m_tableView reloadData]; 85 | } 86 | 87 | - (bool)scroll_enabled 88 | { 89 | return false; 90 | } 91 | 92 | - (void)setContentInfo:(int)_guessid 93 | { 94 | guessid = _guessid; 95 | } 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /BBSAdmin/InfoCenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // InfoCenter.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-7. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // Info Center writed by C language 8 | 9 | #ifndef __INFOCENTER_H_ 10 | #define __INFOCENTER_H_ 11 | 12 | extern bool USE_MEMBER; 13 | extern NSString * help_board; 14 | 15 | #define SCROLL_REFRESH_TH 0.15f 16 | 17 | #include "libSMTH/smth_netop.h" 18 | 19 | NSData * apiConvertUploadPhoto(UIImage * image); 20 | 21 | NSData * apiConvertUploadFace(UIImage * image); 22 | 23 | //Member 24 | NSString * apiGetMBSelect(); 25 | NSString * apiGetMBSelectName(); 26 | void apiSetMBSelect(NSString * board_id, NSString * board_name); 27 | 28 | //APNS 29 | /* ret: 0:updated. 1:not updated because same as previous 2:not updated because waiting for token/user -1:update fail, server error */ 30 | int apiUpdateAPNS(NSString * token); 31 | 32 | //check net status 33 | int apiCheckNetStatus();//-1:net disconnection 0:mobile net 1:wifi 34 | 35 | @interface NSAppSetting : NSObject 36 | { 37 | @public 38 | int attachment_images_size; //0:middle, 1:large, 2:none, 3:small 39 | int upphoto_size; //0:middle, 1:large, 2:small 40 | int brcmode; 41 | 42 | int my_notify_number; 43 | NSString * my_dismiss_version; 44 | 45 | int font_size; 46 | 47 | int article_sort; 48 | 49 | int mail_unread; 50 | int at_unread; 51 | int reply_unread; 52 | 53 | int unread_apns_cnt; //notifications from apns. set when received notifications. clear after message_unread_check(). The tarbar badge should set to unread+apns_cnt. 54 | bool unread_is_updating; //不管任何时候,只有一个dispatch_async()在跑。 55 | 56 | int order_threadid; //0: order by articleid, 1: order by threadid 57 | 58 | @private 59 | NSString * strUsr; 60 | NSString * strPwd; 61 | NSString *mStrAccessToken; 62 | } 63 | 64 | -(void)setLoginInfo:(NSString *)usr :(NSString *)pwd; 65 | -(void)load_setting; 66 | 67 | -(NSString *)getLoginInfoUsr; 68 | -(NSString *)getLoginInfoPwd; 69 | 70 | -(void)appSettingChange:(NSString *)name :(NSString *)value; 71 | 72 | -(NSString*)apiGetAccessToken; 73 | -(void)apiSetAccessToken:(NSString*)actoken; 74 | @end 75 | 76 | extern NSAppSetting * appSetting; 77 | void apiAppSettingInit(); 78 | 79 | NSString * appGetDateString(NSTimeInterval time, NSTimeInterval cur_time); 80 | NSString * appGetDateStringAfter(NSTimeInterval time, NSTimeInterval cur_time); 81 | 82 | //UI update func 83 | //void message_tabbar_update(); 84 | //void message_view_update(); 85 | 86 | void message_unread_check(bool force); //force==0: check only unread_apns_cnt > 0 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /BBSAdmin/LoginBBSViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoginBBSViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-3. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import "AppViewController.h" 13 | 14 | @interface LoginBBSViewController : AppViewController 15 | { 16 | int m_nNetStatus; 17 | NSString * last_changelog; 18 | 19 | int notify_number; 20 | NSString * notify_msg; 21 | 22 | NSString * newversion; 23 | 24 | int ret_newversion; 25 | int ret_pwd; 26 | 27 | int alert_delegate_mode; 28 | } 29 | 30 | @property (strong, nonatomic) IBOutlet UITextField *m_txtFldUser; 31 | @property (strong, nonatomic) IBOutlet UITextField *m_txtFldPwd; 32 | @property (strong, nonatomic) IBOutlet UILabel *m_labelNetStatus; 33 | 34 | @property (strong, nonatomic) IBOutlet UIImageView *img_bg; 35 | @property (strong, nonatomic) NSString *m_strUser; 36 | @property (strong, nonatomic) NSString *m_strPwd; 37 | @property (strong, nonatomic) IBOutlet UITextView *textview_eula; 38 | @property (strong, nonatomic) IBOutlet UIButton *button_eula_disagree; 39 | @property (strong, nonatomic) IBOutlet UIButton *button_eula_agree; 40 | - (IBAction)pressBtnEULAdisagree:(id)sender; 41 | - (IBAction)pressBtnEULAagree:(id)sender; 42 | 43 | - (IBAction)retrunEditTextField:(id)sender; 44 | - (IBAction)pressBtnClear:(id)sender; 45 | - (IBAction)pressBtnLogin:(id)sender; 46 | - (IBAction)textFieldDoneEditing:(id)sender; 47 | 48 | - (void)updateNetStatus; 49 | 50 | - (BOOL)checkInputText; 51 | - (void)goContentView; 52 | 53 | @end 54 | 55 | -------------------------------------------------------------------------------- /BBSAdmin/MBSelectViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MBSelectViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/11/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "UserData.h" 12 | #import "InfoCenter.h" 13 | #import "AppViewController.h" 14 | 15 | @interface MBSelectViewController : AppViewController 16 | { 17 | NSMutableArray * mblist; 18 | 19 | bool in_search; 20 | UITapGestureRecognizer * tap; 21 | 22 | bool waiting_for_mbselect; 23 | 24 | NSMutableArray * bhis; 25 | } 26 | 27 | - (IBAction)pressBtnBack:(id)sender; 28 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 29 | - (IBAction)pressBtnSearch:(id)sender; 30 | @property (strong, nonatomic) IBOutlet UISearchBar *searchbar; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /BBSAdmin/MatchContentViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MatchContentViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/3/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import 13 | #import "MatchOptionCell.h" 14 | #import "MatchHeadCell.h" 15 | #import "AppViewController.h" 16 | 17 | #define MAX_OPTIONS_PER_MATCH 4 18 | 19 | @interface MatchContentViewController : AppViewController 20 | { 21 | int guessid; 22 | int matchid; 23 | int status; //0:not start 1:available 2:end 3:result done 24 | int selnum; 25 | 26 | NSDictionary * match; 27 | NSArray * options; 28 | NSDictionary * mymoney; 29 | NSArray * myvotes; 30 | int matchmode; 31 | int my_voted_money[MAX_OPTIONS_PER_MATCH]; 32 | int canvote; 33 | 34 | int addvotemode; 35 | int vote_sel; 36 | int vote_addmoney; 37 | } 38 | 39 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 40 | 41 | //public API 42 | -(void)setContentInfo:(int)guess_id :(int)match_id; 43 | -(void)VoteMatch:(int)sel :(int)addmoney; 44 | -(void)scroll_to_sel:(int)index; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BBSAdmin/MatchHeadCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MatchHeadCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/3/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MatchHeadCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UILabel *label_name; 13 | @property (strong, nonatomic) IBOutlet UILabel *label_mymoney; 14 | @property (strong, nonatomic) IBOutlet UILabel *label_status; 15 | 16 | 17 | -(void)setContentInfo:(NSString *)name :(NSString *)status :(NSString *)money; 18 | @end 19 | -------------------------------------------------------------------------------- /BBSAdmin/MatchHeadCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MatchHeadCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/3/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "MatchHeadCell.h" 10 | 11 | @implementation MatchHeadCell 12 | @synthesize label_mymoney,label_name,label_status; 13 | 14 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 15 | { 16 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 17 | if (self) { 18 | // Initialization code 19 | } 20 | return self; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 24 | { 25 | [super setSelected:selected animated:animated]; 26 | 27 | // Configure the view for the selected state 28 | } 29 | 30 | -(void)setContentInfo:(NSString *)name :(NSString *)money :(NSString *)status 31 | { 32 | [label_name setText:name]; 33 | 34 | [label_mymoney setText:money]; 35 | 36 | [label_status setText:status]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /BBSAdmin/MatchHeadCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 31 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /BBSAdmin/MatchHeadCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 31 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /BBSAdmin/MatchInfoCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MatchInfoCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/30/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MatchInfoCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UILabel *label_name; 13 | @property (strong, nonatomic) IBOutlet UIImageView *img_icon; 14 | 15 | //public API 16 | /** 17 | *@ param dirmode 1:show top, 2:show mymoney 0:others 18 | */ 19 | -(void)setContentInfo:(NSString*)name :(int)dirmode; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /BBSAdmin/MatchInfoCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MatchInfoCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/30/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "MatchInfoCell.h" 10 | 11 | @implementation MatchInfoCell 12 | @synthesize label_name; 13 | @synthesize img_icon; 14 | 15 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 16 | { 17 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | 24 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 25 | { 26 | [super setSelected:selected animated:animated]; 27 | 28 | // Configure the view for the selected state 29 | } 30 | 31 | -(void)setContentInfo:(NSString*)name :(int)dirmode 32 | { 33 | [label_name setText:name]; 34 | 35 | if(dirmode == 1){ 36 | img_icon.image = [UIImage imageNamed:@"guess_top.png"]; 37 | }else if(dirmode == 2){ 38 | img_icon.image = [UIImage imageNamed:@"guess_mymoney.png"]; 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /BBSAdmin/MatchInfoCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BBSAdmin/MatchInfoCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BBSAdmin/MatchListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MatchListViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/30/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import "MatchInfoCell.h" 13 | #import 14 | #import "MatchContentViewController.h" 15 | #import "GuessTopViewController.h" 16 | #import "AppViewController.h" 17 | 18 | @interface MatchListViewController : AppViewController 19 | { 20 | int guessid; 21 | int guess_mymoney; 22 | int guess_mode; 23 | 24 | int allmatch_mode; 25 | } 26 | 27 | @property (strong, nonatomic) NSMutableArray *m_mtarrayInfo; 28 | 29 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 30 | 31 | 32 | -(void)setContentInfo:(int)i_guessid :(int)allmatch; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /BBSAdmin/MatchOptionCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MatchOptionCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/3/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InfoCenter.h" 11 | #import "MatchContentViewController.h" 12 | 13 | @interface MatchOptionCell : UITableViewCell 14 | { 15 | int guessid; 16 | int matchid; 17 | int mode; 18 | 19 | float odds; 20 | int sel; 21 | 22 | UIViewController * parent; 23 | } 24 | 25 | @property (strong, nonatomic) IBOutlet UILabel *label_name; 26 | @property (strong, nonatomic) IBOutlet UILabel *label_odds; 27 | @property (strong, nonatomic) IBOutlet UILabel *label_voted; 28 | @property (strong, nonatomic) IBOutlet UILabel *label_add; 29 | @property (strong, nonatomic) IBOutlet UITextField *text_addmoney; 30 | - (IBAction)pressBtnAdd:(id)sender; 31 | @property (strong, nonatomic) IBOutlet UIButton *button_add; 32 | - (IBAction)beginEdit:(id)sender; 33 | 34 | -(void)setContentInfo:(NSString*)name :(int)_mode :(float)_odds :(int)voted :(int)_sel :(int)status :(UIViewController *)_parent; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /BBSAdmin/MatchOptionCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MatchOptionCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/3/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "MatchOptionCell.h" 10 | 11 | @implementation MatchOptionCell 12 | @synthesize label_name; 13 | @synthesize label_odds,label_voted,label_add,text_addmoney,button_add; 14 | 15 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 16 | { 17 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | 24 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 25 | { 26 | [super setSelected:selected animated:animated]; 27 | 28 | // Configure the view for the selected state 29 | } 30 | 31 | - (IBAction)beginEdit:(id)sender { 32 | [(MatchContentViewController *)parent scroll_to_sel:sel]; 33 | 34 | } 35 | 36 | -(void)setContentInfo:(NSString*)name :(int)_mode :(float)_odds :(int)voted :(int)_sel :(int)status :(UIViewController *)_parent 37 | { 38 | [label_name setText:name]; 39 | 40 | mode = _mode; 41 | odds = _odds; 42 | 43 | if(mode != 0){ 44 | [label_odds setText:[NSString stringWithFormat:@"赔率: %.02f", odds]]; 45 | }else{ 46 | [label_odds setText:[NSString stringWithFormat:@"投注: %d注", (int)odds]]; 47 | } 48 | 49 | if(voted){ 50 | [label_voted setText:[NSString stringWithFormat:@"您已投%d注", voted]]; 51 | [label_add setText:@"加注"]; 52 | }else{ 53 | [label_voted setHidden:YES]; 54 | [label_add setText:@"投注"]; 55 | } 56 | sel = _sel; 57 | 58 | if(status != 1){ 59 | [button_add setHidden:YES]; 60 | } 61 | 62 | parent = _parent; 63 | } 64 | 65 | - (IBAction)pressBtnAdd:(id)sender { 66 | int addmoney = [text_addmoney.text intValue]; 67 | 68 | [(MatchContentViewController *)parent VoteMatch:sel :addmoney]; 69 | return; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /BBSAdmin/MessageInfoCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessageInfoCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MessageInfoCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UILabel *label_name; 13 | @property (strong, nonatomic) IBOutlet UILabel *label_count; 14 | @property (strong, nonatomic) IBOutlet UIImageView *imageview_dir; 15 | 16 | //public API 17 | -(void)setContentInfo:(NSString*)name :(int)unread :(UIImage *)image; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /BBSAdmin/MessageInfoCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MessageInfoCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "MessageInfoCell.h" 10 | 11 | @implementation MessageInfoCell 12 | @synthesize label_count,label_name,imageview_dir; 13 | 14 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 15 | { 16 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 17 | if (self) { 18 | // Initialization code 19 | } 20 | return self; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 24 | { 25 | [super setSelected:selected animated:animated]; 26 | 27 | // Configure the view for the selected state 28 | } 29 | 30 | -(void)setContentInfo:(NSString*)name :(int)unread :(UIImage *)image 31 | { 32 | [label_name setText:name]; 33 | 34 | if(unread == 0){ 35 | [label_count setText:@""]; 36 | }else{ 37 | [label_count setText:[NSString stringWithFormat:@"%d条未读",unread]]; 38 | label_count.textColor = [UIColor redColor]; 39 | } 40 | 41 | if(image) { 42 | imageview_dir.image = image; 43 | } 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BBSAdmin/MessageInfoCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /BBSAdmin/MessageInfoCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /BBSAdmin/MessagesViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MessagesViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "MessageInfoCell.h" 12 | #import "InfoCenter.h" 13 | #import "ArticleListViewController.h" 14 | #import "AppViewController.h" 15 | 16 | @interface MessagesViewController : AppViewController 17 | { 18 | } 19 | 20 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 21 | @property (strong, nonatomic) IBOutlet UINavigationItem *navi; 22 | 23 | -(void)refresh; 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SICellSelection.h: -------------------------------------------------------------------------------- 1 | // 2 | // SICellSelection.h 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/21/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SICellSelection : UIView 12 | - (id)initWithFrame:(CGRect)frame andColor:(UIColor *)baseColor_; 13 | @end 14 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SICellSelection.m: -------------------------------------------------------------------------------- 1 | // 2 | // SICellSelection.m 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/21/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import "SICellSelection.h" 10 | #import 11 | 12 | @interface SICellSelection () 13 | @property (nonatomic, strong) UIColor *baseColor; 14 | @end 15 | 16 | @implementation SICellSelection 17 | 18 | - (id)initWithFrame:(CGRect)frame andColor:(UIColor *)baseColor_ 19 | { 20 | self = [super initWithFrame:frame]; 21 | if (self) { 22 | self.baseColor = baseColor_; 23 | self.autoresizingMask = UIViewAutoresizingFlexibleWidth; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)drawRect:(CGRect)rect 29 | { 30 | [super drawRect:rect]; 31 | 32 | CGFloat hue; 33 | CGFloat saturation; 34 | CGFloat brightness; 35 | CGFloat alpha; 36 | 37 | if([self.baseColor getHue:&hue saturation:&saturation brightness:&brightness alpha:&alpha]){ 38 | brightness -= 0.35; 39 | } 40 | 41 | UIColor * highColor = self.baseColor; 42 | UIColor * lowColor = [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:alpha]; 43 | 44 | CAGradientLayer * gradient = [CAGradientLayer layer]; 45 | [gradient setFrame:[self bounds]]; 46 | [gradient setColors:[NSArray arrayWithObjects:(id)[highColor CGColor], (id)[lowColor CGColor], nil]]; 47 | [[self layer] addSublayer:gradient]; 48 | 49 | [self setNeedsDisplay]; 50 | } 51 | 52 | - (void)dealloc 53 | { 54 | self.baseColor = nil; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SIMenuButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // SAMenuButton.h 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/19/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SIMenuButton : UIControl 12 | 13 | @property (nonatomic, unsafe_unretained) BOOL isActive; 14 | @property (nonatomic) CGGradientRef spotlightGradientRef; 15 | @property (unsafe_unretained) CGFloat spotlightStartRadius; 16 | @property (unsafe_unretained) float spotlightEndRadius; 17 | @property (unsafe_unretained) CGPoint spotlightCenter; 18 | @property (nonatomic, strong) UILabel *title; 19 | @property (nonatomic, strong) UIImageView *arrow; 20 | 21 | - (UIImageView *)defaultGradient; 22 | - (id)initWithFrame:(CGRect)frame :(NSString *)img_name; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SIMenuButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // SAMenuButton.m 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/19/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import "SIMenuButton.h" 10 | #import "SIMenuConfiguration.h" 11 | 12 | @implementation SIMenuButton 13 | 14 | - (id)initWithFrame:(CGRect)frame :(NSString *)img_name 15 | { 16 | self = [super initWithFrame:frame]; 17 | if (self) { 18 | if ([self defaultGradient]) { 19 | 20 | } else { 21 | [self setSpotlightCenter:CGPointMake(frame.size.width/2, frame.size.height*(-1)+10)]; 22 | [self setBackgroundColor:[UIColor clearColor]]; 23 | [self setSpotlightStartRadius:0]; 24 | [self setSpotlightEndRadius:frame.size.width/2]; 25 | } 26 | 27 | frame.origin.y -= 2.0; 28 | self.title = [[UILabel alloc] initWithFrame:frame]; 29 | self.title.textAlignment = NSTextAlignmentCenter; 30 | self.title.backgroundColor = [UIColor clearColor]; 31 | NSDictionary *currentStyle = [[UINavigationBar appearance] titleTextAttributes]; 32 | self.title.textColor = currentStyle[UITextAttributeTextColor]; 33 | self.title.font = currentStyle[UITextAttributeFont]; 34 | self.title.shadowColor = currentStyle[UITextAttributeTextShadowColor]; 35 | NSValue *shadowOffset = currentStyle[UITextAttributeTextShadowOffset]; 36 | self.title.shadowOffset = shadowOffset.CGSizeValue; 37 | [self addSubview:self.title]; 38 | 39 | if(img_name != nil){ 40 | self.arrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:img_name]]; 41 | }else{ 42 | self.arrow = [[UIImageView alloc] initWithImage:[SIMenuConfiguration arrowImage]]; 43 | } 44 | [self addSubview:self.arrow]; 45 | } 46 | return self; 47 | } 48 | 49 | - (UIImageView *)defaultGradient 50 | { 51 | return nil; 52 | } 53 | 54 | - (void)layoutSubviews 55 | { 56 | [self.title sizeToFit]; 57 | self.title.center = CGPointMake(self.frame.size.width/2, (self.frame.size.height-2.0)/2); 58 | self.arrow.center = CGPointMake(CGRectGetMaxX(self.title.frame) + [SIMenuConfiguration arrowPadding], self.frame.size.height / 2); 59 | } 60 | 61 | #pragma mark - 62 | #pragma mark Handle taps 63 | - (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event 64 | { 65 | self.isActive = !self.isActive; 66 | CGGradientRef defaultGradientRef = [[self class] newSpotlightGradient]; 67 | [self setSpotlightGradientRef:defaultGradientRef]; 68 | CGGradientRelease(defaultGradientRef); 69 | return YES; 70 | } 71 | - (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event 72 | { 73 | return YES; 74 | } 75 | - (void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event 76 | { 77 | self.spotlightGradientRef = nil; 78 | } 79 | - (void)cancelTrackingWithEvent:(UIEvent *)event 80 | { 81 | self.spotlightGradientRef = nil; 82 | } 83 | 84 | #pragma mark - Drawing Override 85 | - (void)drawRect:(CGRect)rect 86 | { 87 | CGContextRef context = UIGraphicsGetCurrentContext(); 88 | CGGradientRef gradient = self.spotlightGradientRef; 89 | float radius = self.spotlightEndRadius; 90 | float startRadius = self.spotlightStartRadius; 91 | CGContextDrawRadialGradient (context, gradient, self.spotlightCenter, startRadius, self.spotlightCenter, radius, kCGGradientDrawsAfterEndLocation); 92 | } 93 | 94 | 95 | #pragma mark - Factory Method 96 | 97 | + (CGGradientRef)newSpotlightGradient 98 | { 99 | size_t locationsCount = 2; 100 | CGFloat locations[2] = {1.0f, 0.0f,}; 101 | CGFloat colors[12] = {0.0f,0.0f,0.0f,0.0f, 102 | 0.0f,0.0f,0.0f,0.55f}; 103 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 104 | CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, colors, locations, locationsCount); 105 | CGColorSpaceRelease(colorSpace); 106 | 107 | return gradient; 108 | } 109 | 110 | - (void)setSpotlightGradientRef:(CGGradientRef)newSpotlightGradientRef 111 | { 112 | CGGradientRelease(_spotlightGradientRef); 113 | _spotlightGradientRef = nil; 114 | 115 | _spotlightGradientRef = newSpotlightGradientRef; 116 | CGGradientRetain(_spotlightGradientRef); 117 | 118 | [self setNeedsDisplay]; 119 | } 120 | 121 | #pragma mark - Deallocation 122 | 123 | - (void)dealloc 124 | { 125 | [self setSpotlightGradientRef:nil]; 126 | } 127 | 128 | @end 129 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SIMenuCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // SAMenuCell.h 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/19/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SIMenuCell : UITableViewCell 12 | - (void)setSelected:(BOOL)selected withCompletionBlock:(void (^)())completion; 13 | @end 14 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SIMenuCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // SAMenuCell.m 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/19/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import "SIMenuCell.h" 10 | #import "SIMenuConfiguration.h" 11 | #import "UIColor+Extension.h" 12 | #import "SICellSelection.h" 13 | #import 14 | 15 | @interface SIMenuCell () 16 | @property (nonatomic, strong) SICellSelection *cellSelection; 17 | @end 18 | 19 | @implementation SIMenuCell 20 | 21 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 22 | { 23 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 24 | if (self) { 25 | self.contentView.backgroundColor = [UIColor color:[SIMenuConfiguration itemsColor] withAlpha:[SIMenuConfiguration menuAlpha]]; 26 | self.textLabel.textColor = [SIMenuConfiguration itemTextColor]; 27 | self.textLabel.textAlignment = NSTextAlignmentCenter; 28 | self.textLabel.shadowColor = [UIColor darkGrayColor]; 29 | self.textLabel.shadowOffset = CGSizeMake(0.0, -1.0); 30 | 31 | self.selectionStyle = UITableViewCellEditingStyleNone; 32 | 33 | self.cellSelection = [[SICellSelection alloc] initWithFrame:self.bounds andColor:[SIMenuConfiguration selectionColor]]; 34 | [self.cellSelection.layer setCornerRadius:6.0]; 35 | [self.cellSelection.layer setMasksToBounds:YES]; 36 | 37 | self.cellSelection.alpha = 0.0; 38 | [self.contentView insertSubview:self.cellSelection belowSubview:self.textLabel]; 39 | } 40 | return self; 41 | } 42 | 43 | - (void)drawRect:(CGRect)rect { 44 | [super drawRect:rect]; 45 | 46 | CGContextRef ctx = UIGraphicsGetCurrentContext(); 47 | CGContextSetLineWidth(ctx, 2.0f); 48 | 49 | CGContextSetRGBStrokeColor(ctx, 0.0f, 0.0f, 0.0f, 1.0f); 50 | CGContextMoveToPoint(ctx, 0, self.contentView.bounds.size.height); 51 | CGContextAddLineToPoint(ctx, self.contentView.bounds.size.width, self.contentView.bounds.size.height); 52 | CGContextStrokePath(ctx); 53 | 54 | CGContextSetRGBStrokeColor(ctx, 1.0f, 1.0f, 1.0f, 0.7f); 55 | 56 | CGContextMoveToPoint(ctx, 0, 0); 57 | CGContextAddLineToPoint(ctx, self.contentView.bounds.size.width, 0); 58 | CGContextStrokePath(ctx); 59 | 60 | } 61 | 62 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 63 | { 64 | [super setSelected:selected animated:animated]; 65 | } 66 | 67 | - (void)setSelected:(BOOL)selected withCompletionBlock:(void (^)())completion 68 | { 69 | float alpha = 0.0; 70 | if (selected) { 71 | alpha = 1.0; 72 | } else { 73 | alpha = 0.0; 74 | } 75 | [UIView animateWithDuration:[SIMenuConfiguration selectionSpeed] animations:^{ 76 | self.cellSelection.alpha = alpha; 77 | } completion:^(BOOL finished) { 78 | completion(); 79 | }]; 80 | } 81 | 82 | - (void)dealloc 83 | { 84 | self.cellSelection = nil; 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SIMenuConfiguration.h: -------------------------------------------------------------------------------- 1 | // 2 | // SIMenuConfiguration.h 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/20/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SIMenuConfiguration : NSObject 12 | //Menu width 13 | + (float)menuWidth; 14 | 15 | //Menu item height 16 | + (float)itemCellHeight; 17 | 18 | //Animation duration of menu appearence 19 | + (float)animationDuration; 20 | 21 | //Menu substrate alpha value 22 | + (float)backgroundAlpha; 23 | 24 | //Menu alpha value 25 | + (float)menuAlpha; 26 | 27 | //Value of bounce 28 | + (float)bounceOffset; 29 | 30 | //Arrow image near title 31 | + (UIImage *)arrowImage; 32 | 33 | //Distance between Title and arrow image 34 | + (float)arrowPadding; 35 | 36 | //Items color in menu 37 | + (UIColor *)itemsColor; 38 | 39 | //Menu color 40 | + (UIColor *)mainColor; 41 | 42 | //Item selection animation speed 43 | + (float)selectionSpeed; 44 | 45 | //Menu item text color 46 | + (UIColor *)itemTextColor; 47 | 48 | //Selection color 49 | + (UIColor *)selectionColor; 50 | @end 51 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SIMenuConfiguration.m: -------------------------------------------------------------------------------- 1 | // 2 | // SIMenuConfiguration.m 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/20/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import "SIMenuConfiguration.h" 10 | 11 | @implementation SIMenuConfiguration 12 | //Menu width 13 | + (float)menuWidth 14 | { 15 | UIWindow *window = [[UIApplication sharedApplication] keyWindow]; 16 | return window.frame.size.width; 17 | } 18 | 19 | //Menu item height 20 | + (float)itemCellHeight 21 | { 22 | return 44.0f; 23 | } 24 | 25 | //Animation duration of menu appearence 26 | + (float)animationDuration 27 | { 28 | return 0.3f; 29 | } 30 | 31 | //Menu substrate alpha value 32 | + (float)backgroundAlpha 33 | { 34 | return 0.0; 35 | } 36 | 37 | //Menu alpha value 38 | + (float)menuAlpha 39 | { 40 | return 0.8; 41 | } 42 | 43 | //Value of bounce 44 | + (float)bounceOffset 45 | { 46 | return -7.0; 47 | } 48 | 49 | //Arrow image near title 50 | + (UIImage *)arrowImage 51 | { 52 | return [UIImage imageNamed:@"arrow_down.png"]; 53 | } 54 | 55 | //Distance between Title and arrow image 56 | + (float)arrowPadding 57 | { 58 | return 16.0; 59 | } 60 | 61 | //Items color in menu 62 | + (UIColor *)itemsColor 63 | { 64 | return [UIColor blackColor]; 65 | } 66 | 67 | + (UIColor *)mainColor 68 | { 69 | return [UIColor blackColor]; 70 | } 71 | 72 | + (float)selectionSpeed 73 | { 74 | return 0.15; 75 | } 76 | 77 | + (UIColor *)itemTextColor 78 | { 79 | return [UIColor whiteColor]; 80 | } 81 | 82 | + (UIColor *)selectionColor 83 | { 84 | return [UIColor colorWithRed:45.0/255.0 green:105.0/255.0 blue:166.0/255.0 alpha:1.0]; 85 | } 86 | @end 87 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SIMenuTable.h: -------------------------------------------------------------------------------- 1 | // 2 | // SAMenuTable.h 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/19/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol SIMenuDelegate 12 | - (void)didBackgroundTap; 13 | - (void)didSelectItemAtIndex:(NSUInteger)index; 14 | @end 15 | 16 | @interface SIMenuTable : UIView 17 | 18 | @property (nonatomic, weak) id menuDelegate; 19 | 20 | - (id)initWithFrame:(CGRect)frame items:(NSArray *)items; 21 | - (void)show; 22 | - (void)hide; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/SINavigationMenuView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SINavigationMenuView.h 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/19/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SIMenuTable.h" 11 | 12 | @protocol SINavigationMenuDelegate 13 | 14 | - (void)didSelectItemAtIndex:(NSUInteger)index; 15 | 16 | @end 17 | 18 | @interface SINavigationMenuView : UIView 19 | 20 | @property (nonatomic, weak) id delegate; 21 | @property (nonatomic, strong) NSArray *items; 22 | 23 | - (id)initWithFrame:(CGRect)frame title:(NSString *)title :(NSString *)img_name; 24 | - (void)displayMenuInView:(UIView *)view; 25 | - (void)setMenuTitle:(NSString *)title; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/UIColor+Extension.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Extension.h 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/21/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (Extension) 12 | + (UIColor *)color:(UIColor *)color_ withAlpha:(float)alpha_; 13 | @end 14 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/UIColor+Extension.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Extension.m 3 | // NavigationMenu 4 | // 5 | // Created by Ivan Sapozhnik on 2/21/13. 6 | // Copyright (c) 2013 Ivan Sapozhnik. All rights reserved. 7 | // 8 | 9 | #import "UIColor+Extension.h" 10 | 11 | @implementation UIColor (Extension) 12 | + (UIColor *)color:(UIColor *)color_ withAlpha:(float)alpha_ 13 | { 14 | UIColor *uicolor = color_; 15 | CGColorRef colorRef = [uicolor CGColor]; 16 | 17 | int numComponents = (int)CGColorGetNumberOfComponents(colorRef); 18 | 19 | CGFloat red = 0.0; 20 | CGFloat green = 0.0; 21 | CGFloat blue = 0.0; 22 | CGFloat alpha = 0.0; 23 | if (numComponents == 4) 24 | { 25 | const CGFloat *components = CGColorGetComponents(colorRef); 26 | red = components[0]; 27 | green = components[1]; 28 | blue = components[2]; 29 | alpha = components[3]; 30 | } 31 | 32 | return [UIColor colorWithRed:red green:green blue:blue alpha:alpha_]; 33 | } 34 | @end 35 | -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/images/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/NavigationMenuView/images/arrow_down.png -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/images/arrow_down1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/NavigationMenuView/images/arrow_down1.png -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/images/arrow_down1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/NavigationMenuView/images/arrow_down1@2x.png -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/images/arrow_down@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/NavigationMenuView/images/arrow_down@2x.png -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/images/arrow_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/NavigationMenuView/images/arrow_list.png -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/images/arrow_list@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/NavigationMenuView/images/arrow_list@2x.png -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/images/arrow_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/NavigationMenuView/images/arrow_search.png -------------------------------------------------------------------------------- /BBSAdmin/NavigationMenuView/images/arrow_search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/NavigationMenuView/images/arrow_search@2x.png -------------------------------------------------------------------------------- /BBSAdmin/ParentTabBarViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ParentTabBarViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-7. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | 12 | @interface ParentTabBarViewController : UITabBarController 13 | { 14 | 15 | } 16 | 17 | @property(strong, nonatomic) MBProgressHUD *m_progressBar; 18 | 19 | - (void)showWelcomeTip; 20 | - (void)refresh; 21 | 22 | @end 23 | 24 | extern ParentTabBarViewController * g_tabbar; 25 | 26 | 27 | -------------------------------------------------------------------------------- /BBSAdmin/ParentTabBarViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ParentTabBarViewController.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-7. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // 8 | 9 | #import "ParentTabBarViewController.h" 10 | #import "InfoCenter.h" 11 | #import "TimelineListViewController.h" 12 | 13 | ParentTabBarViewController * g_tabbar = nil; 14 | 15 | void message_tabbar_update() 16 | { 17 | if(g_tabbar == nil){ 18 | return; 19 | } 20 | 21 | [g_tabbar refresh]; 22 | } 23 | 24 | @interface ParentTabBarViewController () 25 | 26 | @end 27 | 28 | @implementation ParentTabBarViewController 29 | @synthesize m_progressBar; 30 | 31 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 32 | { 33 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 34 | if (self) { 35 | // Custom initialization 36 | } 37 | return self; 38 | } 39 | 40 | - (void)viewDidLoad 41 | { 42 | [super viewDidLoad]; 43 | // Do any additional setup after loading the view. 44 | [self showWelcomeTip]; 45 | 46 | message_tabbar_update(); 47 | } 48 | 49 | - (void)didReceiveMemoryWarning 50 | { 51 | [super didReceiveMemoryWarning]; 52 | // Dispose of any resources that can be recreated. 53 | } 54 | 55 | - (void)viewWillAppear:(BOOL)animated 56 | { 57 | [super viewWillAppear:animated]; 58 | } 59 | 60 | - (void)viewWillDisappear:(BOOL)animated 61 | { 62 | [super viewWillDisappear:animated]; 63 | } 64 | 65 | -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 66 | { 67 | if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)//iphone or ipod 68 | { 69 | return ((toInterfaceOrientation == UIDeviceOrientationPortrait)||(toInterfaceOrientation == UIDeviceOrientationPortraitUpsideDown)); 70 | } 71 | else//ipad 72 | { 73 | return ((toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft)||(toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)); 74 | } 75 | } 76 | 77 | - (void)showWelcomeTip 78 | { 79 | 80 | } 81 | 82 | #pragma mark MBProgressHUD Delegate 83 | - (void)hudWasHidden:(MBProgressHUD *)hud 84 | { 85 | if (m_progressBar) 86 | { 87 | [m_progressBar removeFromSuperview]; 88 | m_progressBar = nil; 89 | } 90 | } 91 | 92 | - (void)refresh 93 | { 94 | [self performSelectorOnMainThread:@selector(updateContent) withObject:nil waitUntilDone:NO]; 95 | } 96 | 97 | -(void)updateContent 98 | { 99 | int count = appSetting->unread_apns_cnt + appSetting->at_unread + appSetting->mail_unread + appSetting->reply_unread; 100 | 101 | #ifdef DEBUG 102 | NSLog(@"message:%d", count); 103 | #endif 104 | 105 | UITabBarItem * t = [self.tabBar.items objectAtIndex:1]; 106 | if(t == nil){ 107 | return; 108 | } 109 | 110 | if(count){ 111 | [t setBadgeValue:[NSString stringWithFormat:@"%d", count]]; 112 | }else{ 113 | [t setBadgeValue:nil]; 114 | } 115 | } 116 | 117 | extern TimelineListViewController * timeline_view_controller; 118 | -(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item 119 | { 120 | if(item.tag == 1){ 121 | if(timeline_view_controller != nil){ 122 | if([timeline_view_controller.m_mtarrayInfo count] > 0){ 123 | NSIndexPath * indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; 124 | [timeline_view_controller.m_tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES]; 125 | } 126 | [timeline_view_controller initContent]; 127 | } 128 | } 129 | } 130 | 131 | @end 132 | -------------------------------------------------------------------------------- /BBSAdmin/PictureViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PictureViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/28/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIAttImageView.h" 11 | 12 | @interface PictureViewController : UIViewController 13 | { 14 | UIScrollView * _scrollView; 15 | UIAttImageView * _imageView; 16 | 17 | NSString * board; 18 | long reply_id; 19 | long pos; 20 | } 21 | @property (strong, nonatomic) IBOutlet UIScrollView *_scrollView; 22 | @property (strong, nonatomic) IBOutlet UIAttImageView *_imageView; 23 | 24 | 25 | //public API 26 | /** 27 | *@ param 28 | */ 29 | - (void)SetContentInfo:(NSString *)board_id :(long)_reply_id :(long)att_pos; 30 | 31 | /** 32 | *@ brief 33 | */ 34 | - (void)enable_scroll; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /BBSAdmin/PictureViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PictureViewController.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/28/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "PictureViewController.h" 10 | 11 | @interface PictureViewController () 12 | 13 | @end 14 | 15 | @implementation PictureViewController 16 | @synthesize _imageView,_scrollView; 17 | 18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 19 | { 20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 21 | if (self) { 22 | // Custom initialization 23 | } 24 | return self; 25 | } 26 | 27 | - (void)enable_scroll 28 | { 29 | CGFloat scale = 3.0f; 30 | if(_imageView.frame.size.width / _scrollView.frame.size.width > scale){ 31 | scale = _imageView.frame.size.width / _scrollView.frame.size.width; 32 | } 33 | if(_imageView.frame.size.height / _scrollView.frame.size.height > scale){ 34 | scale = _imageView.frame.size.height / _scrollView.frame.size.height; 35 | } 36 | 37 | _scrollView.maximumZoomScale = scale; 38 | } 39 | 40 | - (void)viewDidLoad 41 | { 42 | [super viewDidLoad]; 43 | // Do any additional setup after loading the view. 44 | 45 | _scrollView.delegate = self; 46 | [_scrollView setBackgroundColor:[UIColor blackColor]]; 47 | 48 | _scrollView.userInteractionEnabled = YES; 49 | 50 | int exist = [_imageView setContentInfo:board :reply_id :pos :1 :2 :self]; 51 | 52 | //single click to exit 53 | UITapGestureRecognizer * singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClickImage)]; 54 | [_scrollView addGestureRecognizer:singleTap]; 55 | 56 | [self.view addSubview:_scrollView]; 57 | [_scrollView addSubview:_imageView]; 58 | 59 | [_scrollView setZoomScale:1.0f animated:NO]; 60 | 61 | if(exist) { 62 | [self enable_scroll]; 63 | } 64 | } 65 | 66 | - (void)onClickImage 67 | { 68 | #ifdef DEBUG 69 | NSLog(@"clicked"); 70 | #endif 71 | [self dismissViewControllerAnimated:NO completion:Nil]; 72 | } 73 | 74 | - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView 75 | { 76 | return _imageView; 77 | } 78 | 79 | - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale 80 | { 81 | #ifdef DEBUG 82 | NSLog(@"scale is %f",scale); 83 | #endif 84 | [_scrollView setZoomScale:scale animated:NO]; 85 | } 86 | 87 | 88 | - (void)didReceiveMemoryWarning 89 | { 90 | [super didReceiveMemoryWarning]; 91 | // Dispose of any resources that can be recreated. 92 | } 93 | 94 | - (void)SetContentInfo:(NSString *)board_id :(long)_reply_id :(long)att_pos 95 | { 96 | board = [board_id copy]; 97 | reply_id = _reply_id; 98 | pos = att_pos; 99 | } 100 | 101 | 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /BBSAdmin/ProgressBar/probar_tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/ProgressBar/probar_tip.png -------------------------------------------------------------------------------- /BBSAdmin/ProgressBar/probar_tip@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/ProgressBar/probar_tip@2x.png -------------------------------------------------------------------------------- /BBSAdmin/Reachability.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: Reachability.h 3 | Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. 4 | Version: 3.0 5 | 6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 7 | Inc. ("Apple") in consideration of your agreement to the following 8 | terms, and your use, installation, modification or redistribution of 9 | this Apple software constitutes acceptance of these terms. If you do 10 | not agree with these terms, please do not use, install, modify or 11 | redistribute this Apple software. 12 | 13 | In consideration of your agreement to abide by the following terms, and 14 | subject to these terms, Apple grants you a personal, non-exclusive 15 | license, under Apple's copyrights in this original Apple software (the 16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 17 | Software, with or without modifications, in source and/or binary forms; 18 | provided that if you redistribute the Apple Software in its entirety and 19 | without modifications, you must retain this notice and the following 20 | text and disclaimers in all such redistributions of the Apple Software. 21 | Neither the name, trademarks, service marks or logos of Apple Inc. may 22 | be used to endorse or promote products derived from the Apple Software 23 | without specific prior written permission from Apple. Except as 24 | expressly stated in this notice, no other rights or licenses, express or 25 | implied, are granted by Apple herein, including but not limited to any 26 | patent rights that may be infringed by your derivative works or by other 27 | works in which the Apple Software may be incorporated. 28 | 29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 34 | 35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 42 | POSSIBILITY OF SUCH DAMAGE. 43 | 44 | Copyright (C) 2013 Apple Inc. All Rights Reserved. 45 | 46 | */ 47 | 48 | #import 49 | #import 50 | #import 51 | 52 | 53 | typedef enum : NSInteger { 54 | NotReachable = 0, 55 | ReachableViaWiFi, 56 | ReachableViaWWAN 57 | } NetworkStatus; 58 | 59 | 60 | extern NSString *kReachabilityChangedNotification; 61 | 62 | 63 | @interface Reachability : NSObject 64 | 65 | /*! 66 | * Use to check the reachability of a given host name. 67 | */ 68 | + (instancetype)reachabilityWithHostName:(NSString *)hostName; 69 | 70 | /*! 71 | * Use to check the reachability of a given IP address. 72 | */ 73 | + (instancetype)reachabilityWithAddress:(const struct sockaddr_in *)hostAddress; 74 | 75 | /*! 76 | * Checks whether the default route is available. Should be used by applications that do not connect to a particular host. 77 | */ 78 | + (instancetype)reachabilityForInternetConnection; 79 | 80 | /*! 81 | * Checks whether a local WiFi connection is available. 82 | */ 83 | + (instancetype)reachabilityForLocalWiFi; 84 | 85 | /*! 86 | * Start listening for reachability notifications on the current run loop. 87 | */ 88 | - (BOOL)startNotifier; 89 | - (void)stopNotifier; 90 | 91 | - (NetworkStatus)currentReachabilityStatus; 92 | 93 | /*! 94 | * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand. 95 | */ 96 | - (BOOL)connectionRequired; 97 | 98 | @end 99 | 100 | 101 | -------------------------------------------------------------------------------- /BBSAdmin/SectionListCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // SectionListCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SectionListCell : UITableViewCell 12 | @property (strong, nonatomic) IBOutlet UILabel *label_name; 13 | @property (strong, nonatomic) IBOutlet UIImageView *img_icon; 14 | 15 | -(void)setContentInfo:(NSString*)name :(NSString *)icon; 16 | @end 17 | -------------------------------------------------------------------------------- /BBSAdmin/SectionListCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // SectionListCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/24/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "SectionListCell.h" 10 | 11 | @implementation SectionListCell 12 | @synthesize label_name, img_icon; 13 | 14 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 15 | { 16 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 17 | if (self) { 18 | // Initialization code 19 | } 20 | return self; 21 | } 22 | 23 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 24 | { 25 | [super setSelected:selected animated:animated]; 26 | 27 | // Configure the view for the selected state 28 | } 29 | 30 | -(void)setContentInfo:(NSString*)name :(NSString *)icon 31 | { 32 | [label_name setText:name]; 33 | if(icon){ 34 | img_icon.image = [UIImage imageNamed:icon]; 35 | } 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /BBSAdmin/SectionListCell_iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BBSAdmin/SectionListCell_iPhone.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BBSAdmin/TimelineListCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TimelineListCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/10/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InfoCenter.h" 11 | #import "UIFaceImageView.h" 12 | 13 | @interface TimelineListCell : UITableViewCell 14 | { 15 | UIViewController * parent; 16 | 17 | NSString * boardid; 18 | NSString * boardname; 19 | } 20 | @property (strong, nonatomic) IBOutlet UILabel *label_userid; 21 | @property (strong, nonatomic) IBOutlet UIImageView *img_att; 22 | @property (strong, nonatomic) IBOutlet UILabel *label_title; 23 | @property (strong, nonatomic) IBOutlet UILabel *label_posttime; 24 | @property (strong, nonatomic) IBOutlet UILabel *label_replytime; 25 | @property (strong, nonatomic) IBOutlet UILabel *label_content; 26 | @property (strong, nonatomic) IBOutlet UIFaceImageView *img_user; 27 | @property (strong, nonatomic) IBOutlet UIImageView *img_friend; 28 | @property (strong, nonatomic) IBOutlet UIImageView *img_reply; 29 | @property (strong, nonatomic) IBOutlet UIView *view_bg; 30 | @property (strong, nonatomic) IBOutlet UIView *view_imgs; 31 | @property (strong, nonatomic) IBOutlet UILabel *label_board; 32 | @property (strong, nonatomic) IBOutlet UIImageView *img_board; 33 | @property (strong, nonatomic) IBOutlet UIView *view_reply_bg; 34 | @property (strong, nonatomic) IBOutlet UILabel *label_reply_title; 35 | @property (strong, nonatomic) IBOutlet UILabel *label_reply_content; 36 | 37 | -(void)setContentInfo:(NSDictionary *)dict :(NSTimeInterval)ts :(long long int)last_read_time :(UIViewController *)_parent; 38 | 39 | - (CGFloat)get_height:(NSDictionary *)dict ; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /BBSAdmin/TimelineListViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TimelineListViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/10/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | #import "InfoCenter.h" 12 | #import 13 | #import "TimelineListCell.h" 14 | #import "AppViewController.h" 15 | #import "NavigationMenuView/SINavigationMenuView.h" 16 | 17 | @interface TimelineListViewController : AppViewController 18 | { 19 | NSTimeInterval cur_time; 20 | long long int last_read_time; 21 | 22 | SINavigationMenuView * menu; 23 | NSArray * menu_items; 24 | 25 | bool waiting_for_mbselect; 26 | 27 | long topid; 28 | long bottomid; 29 | bool loadold; 30 | } 31 | 32 | @property (strong, nonatomic) NSMutableArray *m_mtarrayInfo; 33 | @property (strong, nonatomic) IBOutlet UISearchBar *searchbar; 34 | 35 | @property (strong, nonatomic) IBOutlet UINavigationItem *navi; 36 | 37 | - (IBAction)pressBtnNew:(id)sender; 38 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /BBSAdmin/UIAttImageView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "InfoCenter.h" 3 | #import "AttCache.h" 4 | 5 | @interface UIAttImageView : UIImageView 6 | { 7 | AttCache * ac; 8 | NSString * key; 9 | 10 | NSMutableData * att_responseData; 11 | NSURLConnection * att_connection; 12 | int expect_size; 13 | int att_size; 14 | 15 | __weak UITableView * tv; 16 | NSIndexPath * index_path; 17 | 18 | int click_en; //1: click for full screen. 2: need update scroll 19 | UIViewController * parent; 20 | 21 | UILabel * label_progress; 22 | 23 | NSString * boardid; 24 | long reply; 25 | long pos; 26 | } 27 | 28 | - (void)att_set_cell:(UITableView *)_tv :(NSIndexPath *)_ip; 29 | - (int)setContentInfo:(NSString *)board_id :(long)reply_id :(long)att_pos :(int)size :(int)click :(UIViewController *)_parent; 30 | + (void)imageClearAttCache; 31 | + (UIImage *)getImageFromCache:(NSString *)board_id :(long)reply_id :(long)att_pos :(int)size; 32 | 33 | 34 | @end -------------------------------------------------------------------------------- /BBSAdmin/UIFaceImageView.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "InfoCenter.h" 3 | #import "UserfaceCache.h" 4 | #import "UserinfoCache.h" 5 | 6 | @interface UIFaceImageView : UIImageView 7 | { 8 | //UserinfoCache * ic; 9 | UserfaceCache * fc; 10 | 11 | NSString * userid; 12 | 13 | //NSMutableData * info_responseData; 14 | NSMutableData * face_responseData; 15 | NSURLConnection * face_connection; 16 | int face_expect_size; 17 | int face_size; 18 | 19 | //int infodone; 20 | int click_userinfo; 21 | UIViewController * parent; 22 | 23 | int forcemode; 24 | } 25 | 26 | //public API 27 | /** 28 | *@ click 0: disable click, 1: click to show userinfoview 2: click to edit profile 29 | */ 30 | - (void)setContentInfo:(NSString *)_userid :(int)click :(UIViewController *)_parent; 31 | 32 | //+ (void)imageClearUserinfoCache; 33 | + (void)imageClearUserfaceCache; 34 | 35 | 36 | @end -------------------------------------------------------------------------------- /BBSAdmin/UIFaceImageView.m: -------------------------------------------------------------------------------- 1 | #import "UIFaceImageView.h" 2 | #import "UserinfoViewController.h" 3 | #import "UIViewController+AppGet.h" 4 | 5 | @implementation UIFaceImageView 6 | 7 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response 8 | { 9 | #ifdef DEBUG 10 | //NSLog(@"receive resp:%@ %d", userid, [((NSHTTPURLResponse *)response) statusCode]); 11 | #endif 12 | if([((NSHTTPURLResponse *)response) statusCode] >= 400){ 13 | face_responseData = nil; 14 | if([((NSHTTPURLResponse *)response) statusCode] == 404){ 15 | [self face_download_done]; 16 | } 17 | return; 18 | } 19 | 20 | face_responseData = [[NSMutableData alloc] init]; 21 | face_expect_size = (response.expectedContentLength > 0) ? (int)response.expectedContentLength : 0; 22 | } 23 | 24 | -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data 25 | { 26 | if(face_responseData){ 27 | [face_responseData appendData:data]; 28 | } 29 | } 30 | 31 | -(void)face_download_done 32 | { 33 | if(face_responseData == nil){ 34 | face_responseData = [[NSMutableData alloc] init]; 35 | } 36 | 37 | #ifdef DEBUG 38 | //NSLog(@"face download done:%@ %d", userid, [face_responseData length]); 39 | #endif 40 | 41 | [fc add_data:face_responseData :userid]; 42 | 43 | if([face_responseData length] > 0){ 44 | UIImage * image = [UIImage imageWithData:face_responseData]; 45 | 46 | if(image != nil){ 47 | self.image = image; 48 | 49 | return; 50 | } 51 | } 52 | 53 | face_responseData = nil; 54 | 55 | } 56 | 57 | -(void)connectionDidFinishLoading:(NSURLConnection *)connection 58 | { 59 | if(face_responseData){ 60 | [self face_download_done]; 61 | } 62 | } 63 | 64 | -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error 65 | { 66 | face_responseData = nil; 67 | return; 68 | } 69 | 70 | - (void)onClickImage 71 | { 72 | if(parent == nil){ 73 | return; 74 | } 75 | 76 | if(click_userinfo == 1){ 77 | UserinfoViewController *userinfoViewController = [UIViewController appGetView:@"UserinfoViewController"]; 78 | 79 | [userinfoViewController setContentInfo:userid]; 80 | [parent presentViewController:userinfoViewController animated:YES completion:nil]; 81 | }else if(click_userinfo == 2){ 82 | UserinfoViewController * v = (UserinfoViewController *)parent; 83 | [v edit_face]; 84 | }else{ 85 | } 86 | } 87 | 88 | - (void)setContentInfo:(NSString *)_userid :(int)click :(UIViewController *)_parent; 89 | { 90 | click_userinfo = click; 91 | parent = _parent; 92 | 93 | CALayer * l = [self layer]; 94 | [l setMasksToBounds:YES]; 95 | [l setCornerRadius:4]; 96 | 97 | NSRange t_range = [_userid rangeOfString:@"."]; 98 | if(t_range.location != NSNotFound){ 99 | userid = [_userid substringToIndex:t_range.location]; 100 | forcemode = 1; 101 | }else{ 102 | userid = [_userid copy]; 103 | forcemode = 0; 104 | } 105 | 106 | if(click_userinfo){ 107 | self.userInteractionEnabled = YES; 108 | UITapGestureRecognizer * singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClickImage)]; 109 | [self addGestureRecognizer:singleTap]; 110 | } 111 | 112 | //infodone = 0; 113 | fc = [UserfaceCache sharedCache]; 114 | face_responseData = nil; 115 | //ic = [UserinfoCache sharedCache]; 116 | 117 | //find userinfo cache 118 | if(!forcemode){ 119 | UIImage * t = [fc getImage:userid]; 120 | if(t != nil) { 121 | self.image = t; 122 | return; 123 | } 124 | } 125 | 126 | //if userface not exist in cache, download userface 127 | #ifdef DEBUG 128 | NSLog(@"real get userface:%@,%@,%d", userid, _userid, forcemode); 129 | #endif 130 | 131 | NSString * url; 132 | if(!forcemode){ 133 | url = [NSString stringWithFormat:@"http://images.newsmth.net/nForum/uploadFace/%@/%@.jpg", [[userid substringToIndex:1] uppercaseString], userid]; 134 | }else{ 135 | url = [NSString stringWithFormat:@"http://images.newsmth.net/nForum/uploadFace/%@/%@", [[userid substringToIndex:1] uppercaseString], _userid]; 136 | } 137 | NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10]; 138 | face_connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; 139 | 140 | return; 141 | } 142 | 143 | - (void)dealloc 144 | { 145 | if(face_connection){ 146 | [face_connection cancel]; 147 | face_connection = nil; 148 | } 149 | } 150 | 151 | + (void)imageClearUserfaceCache 152 | { 153 | UserfaceCache * ac = [UserfaceCache sharedCache]; 154 | 155 | [ac clear_cache]; 156 | } 157 | 158 | @end -------------------------------------------------------------------------------- /BBSAdmin/UIViewController+AppGet.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UIViewController (AppGet) 4 | 5 | + (id)appGetView:(NSString *)view_id; 6 | 7 | @end -------------------------------------------------------------------------------- /BBSAdmin/UIViewController+AppGet.m: -------------------------------------------------------------------------------- 1 | #import "UIViewController+AppGet.h" 2 | 3 | @implementation UIViewController (AppGet) 4 | 5 | + (id)appGetView:(NSString *)view_id 6 | { 7 | UIStoryboard *mainStoryboard = nil; 8 | if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) 9 | { 10 | mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil]; 11 | } 12 | else 13 | { 14 | mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad" bundle:nil]; 15 | } 16 | 17 | UIViewController * newViewController = [mainStoryboard instantiateViewControllerWithIdentifier:view_id]; 18 | newViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; 19 | 20 | return newViewController; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /BBSAdmin/UserData.h: -------------------------------------------------------------------------------- 1 | #ifndef _USERDATA_H_ 2 | #define _USERDATA_H_ 3 | 4 | //userdata 5 | 6 | //BRC 7 | //for normal board, last_art_id the latest article ID read. 8 | //for "___" board, timeline mode, is the latest time updated. 9 | long long int apiGetUserData_BRC(NSString * board_id); 10 | int apiSetUserData_BRC(NSString * board_id, long long int last_art_id); 11 | //Member Boards List 12 | NSMutableArray * apiGetUserData_MBList(); 13 | int apiSetUserData_MBList(NSMutableArray * mblist); 14 | 15 | //post att 16 | NSString * apiGetUserdata_attpost_path(NSString * fname); 17 | 18 | //friends 19 | int apiSetUserData_friends(NSMutableDictionary * friends); 20 | int apiSetUserData_add_friend(NSString * userid); 21 | int apiSetUserData_del_friend(NSString * userid); 22 | NSMutableDictionary * apiGetUserData_friends(); 23 | int apiGetUserData_is_friends(NSString * userid); 24 | 25 | //board history 26 | int apiSetUserData_add_bhis(NSDictionary * brd); 27 | NSMutableArray * apiGetUserData_bhis(); 28 | 29 | //config 30 | int apiSetUserData_config(NSString * key, NSString * value); 31 | NSString * apiGetUserData_config(NSString * key); 32 | 33 | #endif -------------------------------------------------------------------------------- /BBSAdmin/UserfaceCache.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "InfoCenter.h" 3 | #import "DiskCache.h" 4 | 5 | @interface UserfaceCache : DiskCache 6 | 7 | + (UserfaceCache *) sharedCache; 8 | 9 | - (UIImage *) getImage:(NSString *)key; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /BBSAdmin/UserfaceCache.m: -------------------------------------------------------------------------------- 1 | #import "UserfaceCache.h" 2 | 3 | 4 | @implementation UserfaceCache 5 | 6 | + (UserfaceCache *) sharedCache 7 | { 8 | static dispatch_once_t once; 9 | static id instance; 10 | 11 | dispatch_once(&once, ^{ 12 | instance = [self new]; 13 | [instance init_with_diskpath:@"Userface" :1]; 14 | }); 15 | 16 | return instance; 17 | } 18 | 19 | - (UIImage *) getImage:(NSString *)key 20 | { 21 | NSData * data = [self get_data:key]; 22 | if(data){ 23 | if([data length] == 0){ 24 | return [UIImage imageNamed:@"head00.png"]; 25 | } 26 | UIImage * t = [UIImage imageWithData:data] ; 27 | if(t != nil){ 28 | return t; 29 | }else{ 30 | 31 | } 32 | } 33 | 34 | return nil; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /BBSAdmin/UserinfoCache.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "InfoCenter.h" 3 | #import "DiskCache.h" 4 | 5 | @interface UserinfoCache : DiskCache 6 | 7 | + (UserinfoCache *) sharedCache; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /BBSAdmin/UserinfoCache.m: -------------------------------------------------------------------------------- 1 | #import "UserinfoCache.h" 2 | 3 | 4 | @implementation UserinfoCache 5 | 6 | + (UserinfoCache *) sharedCache 7 | { 8 | static dispatch_once_t once; 9 | static id instance; 10 | 11 | dispatch_once(&once, ^{ 12 | instance = [self new]; 13 | [instance init_with_diskpath:@"Userinfo" :1]; 14 | }); 15 | 16 | return instance; 17 | } 18 | @end 19 | -------------------------------------------------------------------------------- /BBSAdmin/UserinfoHeadCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserinfoHeadCell.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/26/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIFaceImageView.h" 11 | 12 | @interface UserinfoHeadCell : UITableViewCell 13 | { 14 | 15 | 16 | } 17 | @property (strong, nonatomic) IBOutlet UIFaceImageView *img_face; 18 | @property (strong, nonatomic) IBOutlet UILabel *label_userid; 19 | @property (strong, nonatomic) IBOutlet UILabel *label_gender; 20 | @property (strong, nonatomic) IBOutlet UILabel *label_title; 21 | @property (strong, nonatomic) IBOutlet UIImageView *img_friend; 22 | 23 | -(void)setContentInfo:(NSString *)userid :(NSString *)title :(NSString *)faceurl :(int)female :(UIViewController *)parent; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /BBSAdmin/UserinfoHeadCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // UserinfoHeadCell.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/26/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import "UserinfoHeadCell.h" 10 | #import "UserData.h" 11 | 12 | @implementation UserinfoHeadCell 13 | @synthesize label_gender,label_title,label_userid,img_face,img_friend; 14 | 15 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 16 | { 17 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | 24 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 25 | { 26 | [super setSelected:selected animated:animated]; 27 | 28 | // Configure the view for the selected state 29 | } 30 | 31 | -(void)setContentInfo:(NSString *)userid :(NSString *)title :(NSString *)faceurl :(int)female :(UIViewController *)parent 32 | { 33 | if(female){ 34 | [label_gender setText:@"性别: 女"]; 35 | }else{ 36 | [label_gender setText:@"性别: 男"]; 37 | } 38 | 39 | [label_title setText:[NSString stringWithFormat:@"身份: %@", title]]; 40 | [label_userid setText:userid]; 41 | 42 | NSString * face_id; 43 | 44 | if(faceurl && ![faceurl isEqualToString:@""]){ 45 | face_id = faceurl; 46 | }else{ 47 | face_id = userid; 48 | } 49 | 50 | if([userid caseInsensitiveCompare:[appSetting getLoginInfoUsr]] == NSOrderedSame){ 51 | [img_face setContentInfo:face_id :2 :parent]; 52 | }else{ 53 | [img_face setContentInfo:face_id :0 :nil]; 54 | } 55 | 56 | 57 | if(apiGetUserData_is_friends(userid)){ 58 | [img_friend setHidden:NO]; 59 | }else{ 60 | [img_friend setHidden:YES]; 61 | } 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /BBSAdmin/UserinfoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserinfoViewController.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 2/26/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "InfoCenter.h" 11 | #import "AppViewController.h" 12 | 13 | @interface UserinfoViewController : AppViewController 14 | { 15 | NSString * userid; 16 | NSDictionary * userinfo; 17 | 18 | bool is_friend; 19 | 20 | int parse_mode; //0:list 1:add friend 2:del friend 3:edit face 21 | 22 | NSString * face_fname; 23 | } 24 | 25 | @property (strong, nonatomic) IBOutlet UITableView *m_tableView; 26 | 27 | - (void)setContentInfo:(NSString *)_userid; 28 | - (void)edit_face; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /BBSAdmin/app_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/app_logo.gif -------------------------------------------------------------------------------- /BBSAdmin/att_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/att_loading.png -------------------------------------------------------------------------------- /BBSAdmin/bar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/bar_bg.png -------------------------------------------------------------------------------- /BBSAdmin/bg-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/bg-blue.png -------------------------------------------------------------------------------- /BBSAdmin/bg-darkblue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/bg-darkblue.png -------------------------------------------------------------------------------- /BBSAdmin/bg-darkblue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/bg-darkblue@2x.png -------------------------------------------------------------------------------- /BBSAdmin/bg-darkgray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/bg-darkgray.png -------------------------------------------------------------------------------- /BBSAdmin/bg-darkgray@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/bg-darkgray@2x.png -------------------------------------------------------------------------------- /BBSAdmin/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/camera.png -------------------------------------------------------------------------------- /BBSAdmin/cbg_ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/cbg_ipad.png -------------------------------------------------------------------------------- /BBSAdmin/cbg_iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/cbg_iphone.png -------------------------------------------------------------------------------- /BBSAdmin/client_signature.h: -------------------------------------------------------------------------------- 1 | // 2 | // client_signature.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 1/17/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #ifndef BBSAdmin_client_signature_h 10 | #define BBSAdmin_client_signature_h 11 | 12 | #define CLIENT_SIGNATURE @"4da4774bea90f3509293d112eb6a24cd" 13 | #define CLIENT_SECRET @"0055a40712ee09f74f70d193c5e8dbc3" 14 | #define CLIENT_USERID @"testapp" 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /BBSAdmin/client_signature.m: -------------------------------------------------------------------------------- 1 | #include "client_signature.h" 2 | 3 | /**** 4 | sample for client_signature.h, see http://wiki.open.newsmth.net 5 | #define CLIENT_SIGNATURE @"111111111111111" 6 | #define CLIENT_SECRET @"111111111111111" 7 | #define CLIENT_USERID @"xxxx" 8 | ****/ 9 | 10 | NSString * client_get_signature() 11 | { 12 | return CLIENT_SIGNATURE; 13 | } 14 | 15 | NSString * client_get_secret() 16 | { 17 | return CLIENT_SECRET; 18 | } 19 | 20 | NSString * client_get_userid() 21 | { 22 | return CLIENT_USERID; 23 | } -------------------------------------------------------------------------------- /BBSAdmin/email_inbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/email_inbox.png -------------------------------------------------------------------------------- /BBSAdmin/email_sent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/email_sent.png -------------------------------------------------------------------------------- /BBSAdmin/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /BBSAdmin/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/first.png -------------------------------------------------------------------------------- /BBSAdmin/first@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/first@2x.png -------------------------------------------------------------------------------- /BBSAdmin/guess_match.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/guess_match.png -------------------------------------------------------------------------------- /BBSAdmin/guess_mymoney.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/guess_mymoney.png -------------------------------------------------------------------------------- /BBSAdmin/guess_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/guess_top.png -------------------------------------------------------------------------------- /BBSAdmin/head00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/head00.png -------------------------------------------------------------------------------- /BBSAdmin/head01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/head01.png -------------------------------------------------------------------------------- /BBSAdmin/head02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/head02.png -------------------------------------------------------------------------------- /BBSAdmin/icon-appsetting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-appsetting.png -------------------------------------------------------------------------------- /BBSAdmin/icon-appsetting@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-appsetting@2x.png -------------------------------------------------------------------------------- /BBSAdmin/icon-article-fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-article-fire.png -------------------------------------------------------------------------------- /BBSAdmin/icon-article-huo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-article-huo.png -------------------------------------------------------------------------------- /BBSAdmin/icon-article-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-article-light.png -------------------------------------------------------------------------------- /BBSAdmin/icon-article-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-article-normal.png -------------------------------------------------------------------------------- /BBSAdmin/icon-article.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-article.png -------------------------------------------------------------------------------- /BBSAdmin/icon-attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-attachment.png -------------------------------------------------------------------------------- /BBSAdmin/icon-hottopics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-hottopics.png -------------------------------------------------------------------------------- /BBSAdmin/icon-hottopics@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-hottopics@2x.png -------------------------------------------------------------------------------- /BBSAdmin/icon-myfavorites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-myfavorites.png -------------------------------------------------------------------------------- /BBSAdmin/icon-myfavorites@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-myfavorites@2x.png -------------------------------------------------------------------------------- /BBSAdmin/icon-reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-reply.png -------------------------------------------------------------------------------- /BBSAdmin/icon-serieplates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-serieplates.png -------------------------------------------------------------------------------- /BBSAdmin/icon-serieplates@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-serieplates@2x.png -------------------------------------------------------------------------------- /BBSAdmin/icon-userinfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-userinfo.png -------------------------------------------------------------------------------- /BBSAdmin/icon-userinfo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon-userinfo@2x.png -------------------------------------------------------------------------------- /BBSAdmin/icon_back1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_back1.png -------------------------------------------------------------------------------- /BBSAdmin/icon_back1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_back1@2x.png -------------------------------------------------------------------------------- /BBSAdmin/icon_board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_board.png -------------------------------------------------------------------------------- /BBSAdmin/icon_board_club.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_board_club.png -------------------------------------------------------------------------------- /BBSAdmin/icon_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_contact.png -------------------------------------------------------------------------------- /BBSAdmin/icon_fav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_fav.png -------------------------------------------------------------------------------- /BBSAdmin/icon_find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_find.png -------------------------------------------------------------------------------- /BBSAdmin/icon_friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_friend.png -------------------------------------------------------------------------------- /BBSAdmin/icon_hot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_hot.png -------------------------------------------------------------------------------- /BBSAdmin/icon_member.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_member.png -------------------------------------------------------------------------------- /BBSAdmin/icon_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_new.png -------------------------------------------------------------------------------- /BBSAdmin/icon_new@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_new@2x.png -------------------------------------------------------------------------------- /BBSAdmin/icon_parent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_parent.png -------------------------------------------------------------------------------- /BBSAdmin/icon_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_search.png -------------------------------------------------------------------------------- /BBSAdmin/icon_search@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_search@2x.png -------------------------------------------------------------------------------- /BBSAdmin/icon_section.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_section.png -------------------------------------------------------------------------------- /BBSAdmin/icon_timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/icon_timeline.png -------------------------------------------------------------------------------- /BBSAdmin/libSMTH/SMTHURLConnection.h: -------------------------------------------------------------------------------- 1 | // 2 | // SMTHURLConnection.h 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 3/7/14. 6 | // Copyright (c) 2014 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol SMTHURLConnectionDelegate; 12 | 13 | @interface SMTHURLConnection : NSObject 14 | { 15 | @public 16 | int net_error; 17 | NSString * net_error_desc; 18 | int net_progress; 19 | 20 | @private 21 | bool net_notoken_nosig; 22 | int net_nocheckerror; 23 | 24 | bool net_usercancel; 25 | 26 | NSCondition * net_cond; 27 | NSMutableData *net_responseData; 28 | 29 | NSURLConnection * net_connection; 30 | 31 | long last_thread_cnt; 32 | } 33 | 34 | @property (weak) id delegate; 35 | 36 | /* must call after [[alloc]init] */ 37 | -(void)init_smth; 38 | /* must call before net_query */ 39 | -(void)reset_status; 40 | /* cancel operation */ 41 | -(void)cancel; 42 | 43 | //thread 44 | -(long)net_GetThreadCnt:(NSString *)board_id; 45 | -(NSArray *)net_LoadThreadList:(NSString *)board_id :(long)from :(long)size :(int)brcmode; 46 | -(NSArray *)net_SearchArticle:(NSString *)board_id :(NSString *)title :(NSString *)user :(long)from :(long)size; 47 | -(NSArray *)net_GetThread:(NSString *)board_id :(long)article_id :(long)from :(long)size :(int)sort; 48 | -(long)net_GetLastThreadCnt; 49 | -(long)net_GetArticleCnt:(NSString *)board_id; 50 | -(NSDictionary*)net_GetArticle:(NSString *)board_id :(long)article_id; 51 | -(long)net_PostArticle:(NSString *)board_id :(NSString *)title :(NSString *)content; 52 | -(long)net_ForwardArticle:(NSString *)board_id :(long)article_id :(NSString *)user; 53 | -(long)net_ReplyArticle:(NSString *)board_id :(long)reply_id :(NSString *)title :(NSString *)content; 54 | -(long)net_CrossArticle:(NSString *)board_id :(long)article_id :(NSString *)dest_board; 55 | //mail 56 | -(int)net_GetMailCountSent; 57 | -(NSDictionary *)net_GetMailCount; 58 | -(NSArray *)net_LoadMailSentList:(long)from :(long)size; 59 | -(NSArray *)net_LoadMailList:(long)from :(long)size; 60 | -(NSDictionary *)net_GetMailSent:(int)position; 61 | -(NSDictionary *)net_GetMail:(int)position; 62 | -(int)net_ReplyMail:(int)position :(NSString *)title :(NSString *)content; 63 | -(long)net_ForwardMail:(int)position :(NSString *)receiver; 64 | -(int)net_PostMail:(NSString *)receiver :(NSString *)title :(NSString *)content; 65 | //refer 66 | -(NSDictionary *)net_GetReferCount:(int)mode; 67 | -(NSArray *)net_LoadRefer:(int)mode :(long)from :(long)size; 68 | -(int)net_SetReferRead:(int)mode :(int)position; 69 | //hot topics 70 | -(NSArray *)net_LoadSectionHot:(long)section; 71 | //favorite 72 | -(NSArray *)net_LoadFavorites:(long)group; 73 | -(void)net_AddFav:(NSString *)board_id; 74 | -(void)net_DelFav:(NSString *)board_id; 75 | //board 76 | -(NSArray *)net_LoadBoards:(long)group; 77 | -(NSArray *)net_QueryBoard:(NSString *)search; 78 | //section 79 | -(NSArray *)net_LoadSection; 80 | -(NSArray *)net_ReadSection:(long)section :(long)group; 81 | //user 82 | -(NSDictionary *)net_QueryUser:(NSString *)userid; 83 | -(NSArray *)net_LoadUserAllFriends:(NSString *)userid; 84 | -(long long)net_LoadUserFriendsTS:(NSString *)userid; 85 | -(int)net_AddUserFriend:(NSString *)userid; 86 | -(int)net_DelUserFriend:(NSString *)userid; 87 | 88 | -(NSDictionary *)net_modifyFace:(NSString *)face_fname; 89 | //member 90 | -(NSArray *)net_LoadMember:(NSString *)userid :(long)from :(long)size; 91 | -(int)net_JoinMember:(NSString *)board_id; 92 | -(int)net_QuitMember:(NSString *)board_id; 93 | //timeline 94 | -(NSArray *)net_LoadTimelineList:(int)friends :(int)loadold :(long)oldid :(long)size :(int)order_thread; 95 | //guess 96 | -(NSArray *)net_ListGuess; 97 | -(NSArray *)net_ListMatch; 98 | -(NSDictionary *)net_LoadGuess:(int)guessid; 99 | -(NSArray *)net_ListGuessTop:(int)guessid; 100 | -(int)net_RegGuess:(int)guessid :(NSString *)realname :(NSString *)phone; 101 | -(NSDictionary *)net_LoadMatch:(int)guessid :(int)matchid; 102 | -(int)net_VoteMatch:(int)guessid :(int)matchid :(int)sel :(int)money; 103 | //login 104 | -(NSDictionary*)net_GetVersion; 105 | -(int)net_LoginBBS:(NSString*)usr :(NSString*)pwd; 106 | -(void)net_LogoutBBS; 107 | 108 | 109 | @end 110 | 111 | @protocol SMTHURLConnectionDelegate 112 | 113 | @optional 114 | /* called when progress updated */ 115 | -(void)smth_update_progress:(SMTHURLConnection *)con; 116 | 117 | @end 118 | -------------------------------------------------------------------------------- /BBSAdmin/libSMTH/libSMTH_0.2.3.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/libSMTH/libSMTH_0.2.3.a -------------------------------------------------------------------------------- /BBSAdmin/libSMTH/smth_netop.h: -------------------------------------------------------------------------------- 1 | #ifndef _SMTH_NETOP_H_ 2 | #define _SMTH_NETOP_H_ 3 | 4 | //attachment 5 | int apiNetAddAttachment(NSString * photo, int * errorcode); 6 | 7 | //APNS 8 | int apiNetRegAPNS(NSString * username, NSString * token, NSString * profile); 9 | 10 | 11 | unsigned int api_get_version(); 12 | 13 | 14 | //defined in libSMTH, implemented not in libSMTH(in client_signature.m). 15 | NSString * client_get_secret(); 16 | NSString * client_get_signature(); 17 | NSString * client_get_userid(); 18 | 19 | 20 | #endif -------------------------------------------------------------------------------- /BBSAdmin/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BBSAdmin 4 | // 5 | // Created by HE BIAO on 14-1-3. 6 | // Copyright (c) 2014年 newsmth. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BBSAdmin/refer_article.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/refer_article.png -------------------------------------------------------------------------------- /BBSAdmin/refer_at.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/refer_at.png -------------------------------------------------------------------------------- /BBSAdmin/second.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/second.png -------------------------------------------------------------------------------- /BBSAdmin/second@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/second@2x.png -------------------------------------------------------------------------------- /BBSAdmin/style_bgpad00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgpad00.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgpad01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgpad01.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgpad02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgpad02.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgpad03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgpad03.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgpad06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgpad06.png -------------------------------------------------------------------------------- /BBSAdmin/style_bgphone00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgphone00.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgphone01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgphone01.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgphone02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgphone02.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgphone03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgphone03.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgphone04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgphone04.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgphone05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgphone05.jpg -------------------------------------------------------------------------------- /BBSAdmin/style_bgphone06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/BBSAdmin/style_bgphone06.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | iOS 2 | === 3 | 4 | official iOS client of newsmth.net 5 | 6 | 7 | website for developers: http://trac.kcn.cn/kbs/wiki/smthapp 8 | -------------------------------------------------------------------------------- /ipadlaunch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/ipadlaunch.png -------------------------------------------------------------------------------- /ipadlaunch_76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/ipadlaunch_76.png -------------------------------------------------------------------------------- /ipadlaunch_retina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/ipadlaunch_retina.png -------------------------------------------------------------------------------- /iphonelaunch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/iphonelaunch.png -------------------------------------------------------------------------------- /iphonelaunch_152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/iphonelaunch_152.png -------------------------------------------------------------------------------- /iphonelaunch_retina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/iphonelaunch_retina.png -------------------------------------------------------------------------------- /iphonelaunch_retina120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthapp/iOS/0e50f9b39319891115b82532a1944b1235b0b3b4/iphonelaunch_retina120.png --------------------------------------------------------------------------------