Advertisement
Guest User

Untitled

a guest
Nov 26th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.13 KB | None | 0 0
  1. <?php
  2.  
  3. class Settings
  4. {
  5.     private $db;
  6.     private $instagram_username;
  7.     private $instagram_password;
  8.     private $like = 0; //[ 0 or 1]
  9.     private $comment = 0; // [0 or 1]
  10.     private $follow = 0; // [0 or 1]
  11.     private $unfollow = 0; // [0 or 1]
  12.     private $upload_photo = 0; // [0 or 1]
  13.     private $target = null; //[Tags, Usernames, Locations]
  14.     private $targetCommenters = 0; //[0 or 1]
  15.     private $targetLikers = 0; //[0 or 1]
  16.     private $targetFollowType = 0; //[0 , followers, followings, both]
  17.     private $media_types;
  18.     private $min_likes;
  19.     private $max_likes;
  20.     private $min_comments;
  21.     private $max_comments;
  22.     private $media_age;
  23.     private $user_profile;
  24.     private $min_followers;
  25.     private $max_followers;
  26.     private $min_followings;
  27.     private $max_followings;
  28.     private $user_relation;
  29.     private $min_posts;
  30.     private $max_posts;
  31.     private $max_tags;
  32.     private $tag_tag;
  33.     private $location_tag;
  34.     private $username_tag;
  35.     private $dont_comment_same_user;
  36.     private $dont_follow_same_user;
  37.     private $dont_follow_privet_user;
  38.     private $follow_cycle;
  39.     private $unfollow_cycle;
  40.     private $unfollow_source; // [ db or all ]
  41.     private $unfollow_who_dont_follow_back;
  42.     private $autostop_likes_count;
  43.     private $autostop_comments_count;
  44.     private $autostop_follows_count;
  45.     private $autostop_unfollows_count;
  46.     private $autostop_timer; // HH-MM
  47.     private $autostop_no_activity; // [1h - 3h -12h - 1d - 3d - 1w];
  48.     private $activity_schedule;
  49.     private $list_tags;
  50.     private $list_users;
  51.     private $list_locations;
  52.     private $list_comments;
  53.     private $blacklist_tags;
  54.     private $blacklist_keywords;
  55.  
  56.     function __construct()
  57.     {
  58.         $this->db = MyDb::getInstance()->getConnection();
  59.     }
  60.  
  61.     public function getSettings($md5id)
  62.     {
  63.         $querySql = $this->db->queryFirstRow('select * from accounts where md5id=%s', $md5id);
  64.         $settings_arr = json_decode($querySql['settings'], true);
  65.         $this->instagram_username = $querySql['username'];
  66.         $this->instagram_password = $querySql['password'];
  67.         $this->like = $settings_arr['likeCheckbox'];
  68.         $this->comment = $settings_arr['commentsCheckbox'];
  69.         $this->follow = $settings_arr['followCheckbox'];
  70.         $this->unfollow = $settings_arr['unfollowCheckbox'];
  71.         $this->upload_photo = $settings_arr['schedulePhotoUploadCheckbox'];
  72.         $this->target = $settings_arr['targetType'];
  73.         $this->targetCommenters = $settings_arr['targetMediaCommentersCheckbox'];
  74.         $this->targetLikers = $settings_arr['targetMediaLikersCheckbox'];
  75.         $this->targetFollowType = $settings_arr['targetFollowType'];
  76.         $this->media_types = $settings_arr['mediaType'];
  77.         $this->min_likes = $settings_arr['inpMinimumLikes'];
  78.         $this->max_likes = $settings_arr['inpMaximumLikes'];
  79.         $this->min_comments = $settings_arr['inpMinComments'];
  80.         $this->max_comments = $settings_arr['inpMaxComments'];
  81.         $this->media_age = $settings_arr['mediaAge'];
  82.         $this->user_profile = $settings_arr['userProfileFilter'];
  83.         $this->min_followers = $settings_arr['inpMinFollowers'];
  84.         $this->max_followers = $settings_arr['inpMaxFollowers'];
  85.         $this->min_followings = $settings_arr['inpMinFollowings'];
  86.         $this->max_followings = $settings_arr['inpMaxFollowings'];
  87.         $this->user_relation = $settings_arr['userRelationFilter'];
  88.         $this->min_posts = $settings_arr['inpMinMediaCount'];
  89.         $this->max_posts = $settings_arr['inpMaxMediaCount'];
  90.         $this->max_tags = $settings_arr['inpTagsCount'];
  91.         $this->tag_tag = $settings_arr['tagAndTagCheckbox'];
  92.         $this->username_tag = $settings_arr['usernameAndTagCheckbox'];
  93.         $this->location_tag = $settings_arr['locationAndTagCheckbox'];
  94.         $this->dont_comment_same_user = $settings_arr['dontCommentSameUserCheckbox'];
  95.         $this->dont_follow_same_user = $settings_arr['followDontSameUserCheckbox'];
  96.         $this->dont_follow_privet_user = $settings_arr['followDontPrivateUserCheckbox'];
  97.         $this->follow_cycle = $settings_arr['inpFollowCycle'];
  98.         $this->unfollow_cycle = $settings_arr['inpunFollowCycle'];
  99.         $this->unfollow_source = $settings_arr['unfollowSource'];
  100.         $this->unfollow_who_dont_follow_back = $settings_arr['unfollowWhoDontFollowMeCheckbox'];
  101.         $this->autostop_likes_count = $settings_arr['inpLikeLimit'];
  102.         $this->autostop_comments_count = $settings_arr['inpCommentLimit'];
  103.         $this->autostop_follows_count = $settings_arr['inpFollowLimit'];
  104.         $this->autostop_unfollows_count = $settings_arr['inpUnfollowLimit'];
  105.         $this->autostop_timer = $settings_arr['inpTimeLimit'];
  106.         $this->autostop_no_activity = $settings_arr['downtimeLimit'];
  107.         $this->activity_schedule = $settings_arr['activitySchedule'];
  108.         $this->list_tags = $settings_arr['tagsListInput'];
  109.         $this->list_users = $settings_arr['usernamesInput'];
  110.         $this->list_locations = $settings_arr['locationTagsInput'];
  111.         $this->list_comments = $settings_arr['commentsTagsInput'];
  112.         $this->blacklist_tags = $settings_arr['tagsBlackListInput'];
  113.         $this->blacklist_keywords = $settings_arr['keyWordsBlackListInput'];
  114.     }
  115.    
  116.    
  117.     public function getLike()
  118.     {
  119.         return $this->like;
  120.     }
  121.    
  122.    
  123.     public function getComment()
  124.     {
  125.         return $this->comment;
  126.     }
  127.    
  128.    
  129.     public function getFollow()
  130.     {
  131.         return $this->follow;
  132.     }
  133.    
  134.     public function getunFollow()
  135.     {
  136.         return $this->unfollow;
  137.     }
  138.    
  139.    
  140.     public function getUploadPhoto()
  141.     {
  142.         return $this->upload_photo;
  143.     }
  144.    
  145.    
  146.     public function getTarget()
  147.     {
  148.         return $this->target;
  149.     }
  150.    
  151.     public function getTargetCommenters()
  152.     {
  153.         return $this->targetCommenters;
  154.     }
  155.    
  156.     public function getTargetLikers()
  157.     {
  158.         return $this->targetLikers;
  159.     }
  160.    
  161.     public function getTargetFollowType()
  162.     {
  163.         return $this->targetFollowType;
  164.     }
  165. }
  166.  
  167. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement