Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Settings
- {
- private $db;
- private $instagram_username;
- private $instagram_password;
- private $like = 0; //[ 0 or 1]
- private $comment = 0; // [0 or 1]
- private $follow = 0; // [0 or 1]
- private $unfollow = 0; // [0 or 1]
- private $upload_photo = 0; // [0 or 1]
- private $target = null; //[Tags, Usernames, Locations]
- private $targetCommenters = 0; //[0 or 1]
- private $targetLikers = 0; //[0 or 1]
- private $targetFollowType = 0; //[0 , followers, followings, both]
- private $media_types;
- private $min_likes;
- private $max_likes;
- private $min_comments;
- private $max_comments;
- private $media_age;
- private $user_profile;
- private $min_followers;
- private $max_followers;
- private $min_followings;
- private $max_followings;
- private $user_relation;
- private $min_posts;
- private $max_posts;
- private $max_tags;
- private $tag_tag;
- private $location_tag;
- private $username_tag;
- private $dont_comment_same_user;
- private $dont_follow_same_user;
- private $dont_follow_privet_user;
- private $follow_cycle;
- private $unfollow_cycle;
- private $unfollow_source; // [ db or all ]
- private $unfollow_who_dont_follow_back;
- private $autostop_likes_count;
- private $autostop_comments_count;
- private $autostop_follows_count;
- private $autostop_unfollows_count;
- private $autostop_timer; // HH-MM
- private $autostop_no_activity; // [1h - 3h -12h - 1d - 3d - 1w];
- private $activity_schedule;
- private $list_tags;
- private $list_users;
- private $list_locations;
- private $list_comments;
- private $blacklist_tags;
- private $blacklist_keywords;
- function __construct()
- {
- $this->db = MyDb::getInstance()->getConnection();
- }
- public function getSettings($md5id)
- {
- $querySql = $this->db->queryFirstRow('select * from accounts where md5id=%s', $md5id);
- $settings_arr = json_decode($querySql['settings'], true);
- $this->instagram_username = $querySql['username'];
- $this->instagram_password = $querySql['password'];
- $this->like = $settings_arr['likeCheckbox'];
- $this->comment = $settings_arr['commentsCheckbox'];
- $this->follow = $settings_arr['followCheckbox'];
- $this->unfollow = $settings_arr['unfollowCheckbox'];
- $this->upload_photo = $settings_arr['schedulePhotoUploadCheckbox'];
- $this->target = $settings_arr['targetType'];
- $this->targetCommenters = $settings_arr['targetMediaCommentersCheckbox'];
- $this->targetLikers = $settings_arr['targetMediaLikersCheckbox'];
- $this->targetFollowType = $settings_arr['targetFollowType'];
- $this->media_types = $settings_arr['mediaType'];
- $this->min_likes = $settings_arr['inpMinimumLikes'];
- $this->max_likes = $settings_arr['inpMaximumLikes'];
- $this->min_comments = $settings_arr['inpMinComments'];
- $this->max_comments = $settings_arr['inpMaxComments'];
- $this->media_age = $settings_arr['mediaAge'];
- $this->user_profile = $settings_arr['userProfileFilter'];
- $this->min_followers = $settings_arr['inpMinFollowers'];
- $this->max_followers = $settings_arr['inpMaxFollowers'];
- $this->min_followings = $settings_arr['inpMinFollowings'];
- $this->max_followings = $settings_arr['inpMaxFollowings'];
- $this->user_relation = $settings_arr['userRelationFilter'];
- $this->min_posts = $settings_arr['inpMinMediaCount'];
- $this->max_posts = $settings_arr['inpMaxMediaCount'];
- $this->max_tags = $settings_arr['inpTagsCount'];
- $this->tag_tag = $settings_arr['tagAndTagCheckbox'];
- $this->username_tag = $settings_arr['usernameAndTagCheckbox'];
- $this->location_tag = $settings_arr['locationAndTagCheckbox'];
- $this->dont_comment_same_user = $settings_arr['dontCommentSameUserCheckbox'];
- $this->dont_follow_same_user = $settings_arr['followDontSameUserCheckbox'];
- $this->dont_follow_privet_user = $settings_arr['followDontPrivateUserCheckbox'];
- $this->follow_cycle = $settings_arr['inpFollowCycle'];
- $this->unfollow_cycle = $settings_arr['inpunFollowCycle'];
- $this->unfollow_source = $settings_arr['unfollowSource'];
- $this->unfollow_who_dont_follow_back = $settings_arr['unfollowWhoDontFollowMeCheckbox'];
- $this->autostop_likes_count = $settings_arr['inpLikeLimit'];
- $this->autostop_comments_count = $settings_arr['inpCommentLimit'];
- $this->autostop_follows_count = $settings_arr['inpFollowLimit'];
- $this->autostop_unfollows_count = $settings_arr['inpUnfollowLimit'];
- $this->autostop_timer = $settings_arr['inpTimeLimit'];
- $this->autostop_no_activity = $settings_arr['downtimeLimit'];
- $this->activity_schedule = $settings_arr['activitySchedule'];
- $this->list_tags = $settings_arr['tagsListInput'];
- $this->list_users = $settings_arr['usernamesInput'];
- $this->list_locations = $settings_arr['locationTagsInput'];
- $this->list_comments = $settings_arr['commentsTagsInput'];
- $this->blacklist_tags = $settings_arr['tagsBlackListInput'];
- $this->blacklist_keywords = $settings_arr['keyWordsBlackListInput'];
- }
- public function getLike()
- {
- return $this->like;
- }
- public function getComment()
- {
- return $this->comment;
- }
- public function getFollow()
- {
- return $this->follow;
- }
- public function getunFollow()
- {
- return $this->unfollow;
- }
- public function getUploadPhoto()
- {
- return $this->upload_photo;
- }
- public function getTarget()
- {
- return $this->target;
- }
- public function getTargetCommenters()
- {
- return $this->targetCommenters;
- }
- public function getTargetLikers()
- {
- return $this->targetLikers;
- }
- public function getTargetFollowType()
- {
- return $this->targetFollowType;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement