break; case 'save_user': save_user(); break; case 'save_user_pass': save_user_pass(); break; case 'delete_user': delete_user(); break; case 'get_user_details': get_user_details(); break; case 'get_user_image': get_user_image(); break; case 'get_user_cert': get_user_cert(); break; case 'get_logo_image': get_logo_image(); break; case 'get_store_image': get_store_image(); break; case 'user_password_reset': user_password_reset(); break; case 'verify_access_level':
<?php // no direct access defined('_XLREXEC') or die('Restricted access'); if ($width > IMAGE_MAX_WIDTH || $width < IMAGE_MIN_WIDTH) { $width = IMAGE_DEF_WIDTH; } if ($height > IMAGE_MAX_HEIGHT || $height < IMAGE_MIN_HEIGHT) { $height = IMAGE_DEF_HEIGHT; } if ($backdrop_url != "") { $image = get_user_image($backdrop_url, $width, $height, CACHE_LIFE); } else { $image = get_stock_backdrop($width, $height); } $image_width = imagesx($image); $image_height = imagesy($image); // Create some colors switch ($color_scheme_id) { case 1: default: $color_header_shade = imagecolorallocatealpha($image, 0, 0, 0, 0); $color_header_border = imagecolorallocate($image, 0, 0, 0); $color_header_text = imagecolorallocate($image, 255, 255, 255); $color_stats_shade = imagecolorallocatealpha($image, 0, 0, 0, 50); $color_stats_border = imagecolorallocatealpha($image, 0, 0, 0, 127); $color_stats_text = imagecolorallocate($image, 255, 255, 255); $color_hb_shade = imagecolorallocatealpha($image, 0, 0, 0, 127); $color_hb_border = imagecolorallocatealpha($image, 0, 0, 0, 127); $color_hb_text = imagecolorallocate($image, 255, 255, 255); $color_image_border = imagecolorallocate($image, 0, 0, 0);
//get comments for current post $get_comments = get_comments($database, $module_type, $module_id, array('ORDER' => "id DESC")); $return_data['total_comments'] = count($get_comments); if (!empty($limit)) { $get_comments = get_comments($database, $module_type, $module_id, array('ORDER' => "id DESC", 'LIMIT' => $limit)); } //get pictures of users if any if (!empty($get_comments)) { $user_images = array(); $user_names = array(); $comment_dates = array(); foreach ($get_comments as $comment) { $id = $comment['id']; $user_id = $comment['user_id']; if (!array_key_exists($user_id, $user_images)) { $user_images[$user_id] = get_user_image($database, $user_id); } if (!array_key_exists($user_id, $user_names)) { $user_name = get_user_name($database, $user_id); if ($user_name) { $user_names[$user_id] = $user_name; } elseif ($comment['ip']) { $user_names[$user_id] = "(IP: " . $comment['ip'] . ")"; } else { $user_names[$user_id] = "Anonymous User"; } } if (!array_key_exists($id, $comment_dates)) { $comment_dates[$id] = date_format(date_create($comment['created']), 'd M Y'); $comment_times[$id] = date_format(date_create($comment['created']), 'H:i A'); }