function die_with_msg($message) { $show_notification = 1; $template = "templates/inner_upload_avatar.htm"; $TBS = new clsTinyButStrong(); $TBS->NoErr = true; $TBS->LoadTemplate("{$template}"); $TBS->Render = TBS_OUTPUT; $TBS->tbs_show(); @mysql_close(); die; }
} else { $my_age = birthday($birthday); } } } //__________________________________________________________________________________________________________________________________________ //______Get my Privacy Setting____________________________________________________________________________________________________________ $template = "themes/{$user_theme}/templates/inner_members_profile_ajax.htm"; //middle of page $sql = "SELECT * FROM privacy WHERE user_id = {$member_id}"; $result = @mysql_fetch_array(@mysql_query($sql)); //Public favorites if ($result['publicfavorites'] == 'no' && $user_id != $member_id) { if ($type == 2 || $type == 4 || $type == 7) { $template = "themes/{$user_theme}/templates/inner_none_existant_file.htm"; //just to give blank results } } //__________________________________________________________________________________________________________________________________________ //______Display Results_____________________________________________________________________________________________________________________ $TBS = new clsTinyButStrong(); $TBS->NoErr = true; // no more error message displayed. $TBS->LoadTemplate("{$template}"); $TBS->MergeBlock('membersmedia', $member_media); //$TBS->MergeBlock('membersfavs', $member_favorites); //$TBS->MergeBlock('membersfavimages', $member_favorites_images); $TBS->tbs_show(TBS_NOTHING); echo $TBS->Source; @mysql_close(); die;
$query = @mysql_query($sql); $result = @mysql_fetch_array($query); $title = $result["gallery_name"]; $description = $result["gallery_description"]; $tags = $result["gallery_tags"]; $allow_comments = 'allow_comments_' . $result["allow_comments"]; $allow_ratings = 'allow_ratings_' . $result["allow_ratings"]; $public_private = 'public_private_' . $result["public_private"]; //seting "selected" value for HTML pull down lists ${$allow_comments} = "selected"; ${$allow_ratings} = "selected"; ${$public_private} = "selected"; if (isset($_POST['submit'])) { //get form post (no mysql_real_escapE) $title = $_POST["title"]; $description = $_POST["description"]; $tags = $_POST["tags"]; } //////////// //disply page //////////// $template = "templates/inner_edit_album.htm"; //middle of page $TBS = new clsTinyButStrong(); $TBS->NoErr = true; // no more error message displayed. $TBS->LoadTemplate("{$template}"); $TBS->Render = TBS_OUTPUT; $TBS->tbs_show(); @mysql_close(); die;
function managemember($user_id, $manage_type) { //manage type can be delete, suspend etc global $config; $base_path = installation_paths(); $user_id = @mysql_real_escape_string($user_id); //check if This is the admin account $sql = "SELECT * FROM member_profile WHERE user_id = {$user_id} AND user_group = 'admin'"; $query = @mysql_query($sql); if (@mysql_num_rows($query) < 0) { $manage_type = ''; } //// //decide what to do with member ///// // Option (1) delete user (this also deletes all user content //////// if ($manage_type == 'delete') { $sql = "DELETE FROM member_profile WHERE user_id = {$user_id}"; @mysql_query($sql); //videos $sql = "UPDATE videos SET approved ='pendingdelete' WHERE user_id = {$user_id}"; @mysql_query($sql); //images $sql = "UPDATE images SET approved ='pendingdelete' WHERE user_id = {$user_id}"; @mysql_query($sql); //blogs $sql = "UPDATE blogs SET approved ='pendingdelete' WHERE user_id = {$user_id}"; @mysql_query($sql); //images galleries $sql = "UPDATE image_galleries SET approved ='pendingdelete' WHERE user_id = {$user_id}"; @mysql_query($sql); //delete from blog_replys $sql = "DELETE FROM blog_replys WHERE by_id = {$user_id}"; @mysql_query($sql); //delete from imagecomments $sql = "DELETE FROM imagecomments WHERE by_id = {$user_id}"; @mysql_query($sql); //delete comment replies also $sql = "DELETE FROM imagecomments_replys WHERE by_id = {$user_id}"; @mysql_query($sql); //delete group videos by member (deleted) $sql = "DELETE FROM group_videos WHERE member_id = {$user_id}"; @mysql_query($sql); //delete group membership $sql = "DELETE FROM group_membership WHERE member_id = {$user_id}"; @mysql_query($sql); //delete from group_comments $sql = "DELETE FROM group_comments WHERE by_id = {$user_id}"; @mysql_query($sql); //delete from pictures $sql = "DELETE FROM pictures WHERE user_id = {$user_id}"; @mysql_query($sql); //delete from friends part 1 $sql = "DELETE FROM friends WHERE user_id = {$user_id}"; @mysql_query($sql); //delete from friends part 2 $sql = "DELETE FROM friends WHERE friends_id = {$user_id}"; @mysql_query($sql); //delete from flagging_comments $sql = "DELETE FROM flagging_comments WHERE user_id = {$user_id}"; @mysql_query($sql); //delete from favorites $sql = "DELETE FROM favorites WHERE WHERE owner_id = {$user_id}"; @mysql_query($sql); //delete from flagging $sql = "DELETE FROM flagging WHERE user_id = {$user_id}"; @mysql_query($sql); //delete from privacy $sql = "DELETE FROM privacy WHERE user_id = {$user_id}"; @mysql_query($sql); //delete from videocomments $sql = "DELETE FROM videocomments WHERE by_id = {$user_id}"; @mysql_query($sql); //delete from videocomments_replys $sql = "DELETE FROM videocomments_replys WHERE by_id = {$user_id}"; @mysql_query($sql); //delete from audiocomments $sql = "DELETE FROM audiocomments WHERE by_id = {$user_id}"; @mysql_query($sql); //delete from audiocomments_replys $sql = "DELETE FROM audiocomments_replys WHERE by_id = {$user_id}"; @mysql_query($sql); //delete from profile comments $sql = "DELETE FROM profilecomments WHERE members_id = {$user_id} OR by_id={$user_id}"; @mysql_query($sql); //delete from profile comments replies $sql = "DELETE FROM profilecomments_replys WHERE by_id = {$user_id}"; @mysql_query($sql); //delete entire groups i manage $sql = "DELETE FROM group_profile WHERE admin_id = {$user_id}"; @mysql_query($sql); //delete video_playlist $sql = "DELETE FROM video_playlist WHERE user_id = {$user_id}"; @mysql_query($sql); //delete video_playlist_lists $sql = "DELETE FROM video_playlist_lists WHERE user_id = {$user_id}"; @mysql_query($sql); } // Option (2) suspend user (content is preserved) /////////////////////// if ($manage_type == 'suspend') { $sql = "UPDATE member_profile SET account_status ='suspended' WHERE user_id = {$user_id}"; @mysql_query($sql); //email customer that activation has been down $send_email = true; $sql = "SELECT * FROM member_profile WHERE user_id = {$user_id}"; $result = mysql_fetch_array(mysql_query($sql)); $to = $result['email_address']; $email_template = $base_path . '/email_templates/accountsuspended.htm'; $subject = $config["email_subject_suspended"]; } // Option (3) aprove user (content is preserved) /////////////////////// if ($manage_type == 'activate') { $sql = "UPDATE member_profile SET account_status ='active' WHERE user_id = {$user_id}"; @mysql_query($sql); //email customer that activation has been down $send_email = true; $sql = "SELECT * FROM member_profile WHERE user_id = {$user_id}"; $result = mysql_fetch_array(mysql_query($sql)); $to = $result['email_address']; $email_template = $base_path . '/email_templates/accountapproved.htm'; $subject = $config["email_subject_approved"]; } // Option (4) Make moderator /////////////////////// if ($manage_type == 'moderator') { $moderator_group = $_POST['moderator_level']; //posted level if ($moderator_group == '') { //error control $moderator_group = 'member'; } $sql = "UPDATE member_profile SET user_group = '{$moderator_group}' WHERE user_id = {$user_id}"; @mysql_query($sql); } // Send any email to member // if ($send_email == true && $config['email_member_admin_actions'] == 'yes') { //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> $from = $config['notifications_from_email']; //send email template to TBS for rendering of variable inside $TBS = new clsTinyButStrong(); $TBS->NoErr = true; // no more error message displayed. $TBS->LoadTemplate("{$email_template}"); $TBS->tbs_show(TBS_NOTHING); $message = $TBS->Source; //load postage.php include $base_path . '/postage.php'; //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> } }