/** * Constructor * Art constructor, takes the UID of the object and the * object type. */ public function __construct($uid, $type = 'album') { $this->type = Art::validate_type($type); $this->uid = $uid; }
define('NO_SESSION', '1'); require_once 'lib/init.php'; // Check to see if they've got an interface session or a valid API session, if not GTFO if (!Session::exists('interface', $_COOKIE[AmpConfig::get('session_name')]) && !Session::exists('api', $_REQUEST['auth'])) { debug_event('image', 'Access denied, checked cookie session:' . $_COOKIE[AmpConfig::get('session_name')] . ' and auth:' . $_REQUEST['auth'], 1); exit; } // If we aren't resizing just trash thumb if (!AmpConfig::get('resize_images')) { $_GET['thumb'] = null; } // FIXME: Legacy stuff - should be removed after a version or so if (!isset($_GET['object_type'])) { $_GET['object_type'] = 'album'; } $type = Art::validate_type($_GET['object_type']); /* Decide what size this image is */ switch ($_GET['thumb']) { case '1': /* This is used by the now_playing stuff */ $size['height'] = '75'; $size['width'] = '75'; break; case '2': $size['height'] = '128'; $size['width'] = '128'; break; case '3': /* This is used by the flash player */ $size['height'] = '80'; $size['width'] = '80';