Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Settings
- {
- private $db;
- private $md5id;
- private $instagram_username; //string
- private $instagram_password; //string
- private $like = 0; //[ 0 - 1]
- private $comment = 0; // [0 - 1]
- private $follow = 0; // [0 - 1]
- private $unfollow = 0; // [0 1]
- private $upload_photo = 0; // [0 - 1]
- private $target = null; //[tags - usernames - locations]
- private $targetCommenters = 0; //[0 - 1]
- private $targetLikers = 0; //[0 - 1]
- private $targetFollowType = 0; //[0 , followers, followings, both]
- private $media_type; // [any - photo - video]
- private $min_likes; //[0-9]
- private $max_likes; //[0-9]
- private $min_comments; //[0-9]
- private $max_comments; //[0-9]
- private $media_age; //[ any - 1h - 12h - 1d - 3d - 1w - 2w - 1M]
- private $user_profile; // [0 - low - medium - High]
- private $min_followers; //[0-9]
- private $max_followers; //[0-9]
- private $min_followings; //[0-9]
- private $max_followings; //[0-9]
- private $user_relation; //[0-9]
- private $min_posts; //[0-9]
- private $max_posts; //[0-9]
- private $max_tags; //[0-9]
- private $tag_tag; //[0-1]
- private $location_tag; // [0-1]
- private $username_tag; // [0-1]
- private $dont_comment_same_user; //[0-1]
- private $dont_follow_same_user; //[0-1]
- private $dont_follow_privet_user; //[0-1]
- private $follow_cycle; //[0-9]
- private $unfollow_cycle; //[0-9]
- private $unfollow_source; // [ db or all ]
- private $unfollow_who_dont_follow_back; //[0-1]
- private $autostop_likes_count; //[0-9]
- private $autostop_comments_count; //[0-1]
- private $autostop_follows_count; //[0-1]
- private $autostop_unfollows_count; //[0-1]
- private $autostop_timer; // hh-mm 09-23
- private $autostop_no_activity; // [1h - 3h -12h - 1d - 3d - 1w];
- private $activity_schedule; // array needs helper to fix time fromat
- private $list_tags; // array()
- private $list_users; // array()
- private $list_locations; // array()
- private $list_comments; // array()
- private $blacklist_tags; // array()
- private $blacklist_keywords; // array()
- private $time_zone; // stirng()
- function __construct()
- {
- $this->db = MyDb::getInstance()->getConnection();
- }
- public function setSettings($md5id)
- {
- $settings_row = $this->db->queryFirstRow('SELECT settings,username,password FROM accounts WHERE md5id=%s', $md5id);
- $settings_arr = json_decode($settings_row['settings'], true);
- $this->md5id = $md5id;
- $this->instagram_username = $settings_row['username'];
- $this->instagram_password = $settings_row['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_type = $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_follow_count = $settings_arr['inpFollowLimit'];
- $this->autostop_unfollow_count = $settings_arr['inpUnfollowLimit'];
- $this->autostop_timer = $settings_arr['inpTimeLimit'];
- $this->autostop_no_activity = $settings_arr['downtimeLimit'];
- $this->activity_schedule = json_decode($settings_arr['activitySchedule'], true);
- $this->list_tags = json_decode($settings_arr['tagsListInput'], true);
- $this->list_users = json_decode($settings_arr['usernamesInput'], true);
- $this->list_locations = json_decode($settings_arr['locationTagsInput'], true);
- $this->list_comments = json_decode($settings_arr['commentsTagsInput'], true);
- $this->blacklist_tags = json_decode($settings_arr['tagsBlackListInput'], true);
- $this->blacklist_keywords = json_decode($settings_arr['keyWordsBlackListInput'], true);
- }
- public function getSettingRow()
- {
- return $this->settings_row;
- }
- public function getmd5id()
- {
- return $this->md5id;
- }
- public function getInstagramUsername()
- {
- return $this->instagram_username;
- }
- public function getInstagramPassword()
- {
- return $this->instagram_password;
- }
- 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;
- }
- public function getMediaType()
- {
- return $this->media_type;
- }
- public function getMinLikes()
- {
- return $this->min_likes;
- }
- public function getMaxLikes()
- {
- return $this->max_likes;
- }
- public function getMinComments()
- {
- return $this->min_comments;
- }
- public function getMaxComments()
- {
- return $this->max_comments;
- }
- public function getMediaAge()
- {
- return $this->media_age;
- }
- public function getUserProfile()
- {
- return $this->user_profile;
- }
- public function getMinFollowers()
- {
- return $this->min_followers;
- }
- public function getMaxFollowers()
- {
- return $this->max_followers;
- }
- public function getMinFollowings()
- {
- return $this->min_followings;
- }
- public function getMaxFollowings()
- {
- return $this->max_followings;
- }
- public function getUserRelation()
- {
- return $this->user_relation;
- }
- public function getMinPosts()
- {
- return $this->min_posts;
- }
- public function getMaxPosts()
- {
- return $this->max_posts;
- }
- public function getMaxTags()
- {
- return $this->max_tags;
- }
- public function getTagTag()
- {
- return $this->tag_tag;
- }
- public function getUsernameTag()
- {
- return $this->username_tag;
- }
- public function getLocationTag()
- {
- return $this->location_tag;
- }
- public function getDontCommentSameUser()
- {
- return $this->dont_comment_same_user;
- }
- public function getDontFollowSameUser()
- {
- return $this->dont_follow_same_user;
- }
- public function getDontFollowPrivetUser()
- {
- return $this->dont_follow_privet_user;
- }
- public function getFollowCycle()
- {
- return $this->follow_cycle;
- }
- public function getUnFollowCycle()
- {
- return $this->unfollow_cycle;
- }
- public function getUnFollowSource()
- {
- return $this->unfollow_source;
- }
- public function getUnFollowWhoDontFollowBack()
- {
- return $this->unfollow_who_dont_follow_back;
- }
- public function getAutostopLikesCount()
- {
- return $this->autostop_likes_count;
- }
- public function getAutostopCommentsCount()
- {
- return $this->autostop_comments_count;
- }
- public function getAutostopFollowCount()
- {
- return $this->autostop_follows_count;
- }
- public function getAutostopUnFollowCount()
- {
- return $this->autostop_unfollows_count;
- }
- public function getAutostopTimer()
- {
- return $this->autostop_timer;
- }
- public function getAutostopNoActivity()
- {
- switch ($this->autostop_no_activity)
- {
- case "1h":
- $this->autostop_no_activity = "1 hours";
- break;
- case "3h":
- $this->autostop_no_activity = "3 hours";
- break;
- case "12h":
- $this->autostop_no_activity = "12 hours";
- break;
- case "1d":
- $this->autostop_no_activity = "1 day";
- break;
- case "3d":
- $this->autostop_no_activity = "3 day";
- break;
- case "1w":
- $this->autostop_no_activity = "1 week";
- break;
- }
- return $this->autostop_no_activity;
- }
- public function getActivitySchedule()
- {
- return $this->activity_schedule;
- }
- public function getListTags()
- {
- return $this->list_tags;
- }
- public function getListUsers()
- {
- return $this->list_users;
- }
- public function getListComments()
- {
- return $this->list_comments;
- }
- public function getListBlacklistTags()
- {
- return $this->blacklist_tags;
- }
- public function getListBlacklistKeywords()
- {
- return $this->blacklist_keywords;
- }
- }
- ?>
Add Comment
Please, Sign In to add comment