function getexifinfo($myimgpath)
{
    $mg_exifoptions = get_option('mygexifoptions');
    $mg_options = get_option('mygalleryoptions');
    $exif = @exif_read_data($myimgpath, 0, true);
    if ($mg_options[language]) {
        load_textdomain('myGallery', myGalleryPath . '/languages/' . $mg_options[language] . '.mo');
    }
    $exposureprogram = array(0 => __('Unidentified', 'myGallery'), 1 => __('Manual', 'myGallery'), 2 => __('Normal', 'myGallery'), 3 => __('Aperture priority', 'myGallery'), 4 => __('Shutter priority', 'myGallery'), 5 => __('Creative', 'myGallery'), 6 => __('Action', 'myGallery'), 7 => __('Portrait mode', 'myGallery'), 8 => __('Landscape mode', 'myGallery'));
    $myexifinfo = '<div class="exifmetalabel">' . __('Metadata', 'myGallery') . '</div>';
    $myexifinfo = $myexifinfo . '<div class="exifbox">';
    if ($mg_exifoptions[make] and ($exif['IFD0']['Make'] or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('Make', 'myGallery') . ': <span class="exifdata' . $class . '">' . $exif['IFD0']['Make'] . '</span></div>';
    }
    if ($mg_exifoptions[model] and ($exif['IFD0']['Model'] or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('Model', 'myGallery') . ': <span class="exifdata' . $class . '">' . $exif['IFD0']['Model'] . '</span></div>';
    }
    if ($mg_exifoptions[exposuretime] and ($exif['EXIF']['ExposureTime'] or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('Exposure Time', 'myGallery') . ': <span class="exifdata' . $class . '">' . $exif['EXIF']['ExposureTime'] . '</span></div>';
    }
    if ($mg_exifoptions[shutterspeed] and ($exif['EXIF']['ShutterSpeedValue'] or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('Shutter Speed', 'myGallery') . ': <span class="exifdata' . $class . '">' . $exif['EXIF']['ShutterSpeedValue'] . '</span></div>';
    }
    if ($mg_exifoptions[afnumber] and ($exif['COMPUTED']['ApertureFNumber'] or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('Aperture FNumber', 'myGallery') . ': <span class="exifdata' . $class . '">' . $exif['COMPUTED']['ApertureFNumber'] . '</span></div>';
    }
    if ($mg_exifoptions[focall] and ($exif['EXIF']['FocalLength'] or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('Focal Length', 'myGallery') . ': <span class="exifdata' . $class . '">' . $exif['EXIF']['FocalLength'] . '</span></div>';
    }
    if ($mg_exifoptions[iso] and ($exif['EXIF']['ISOSpeedRatings'] or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('ISO Speed Ratings', 'myGallery') . ': <span class="exifdata' . $class . '">' . $exif['EXIF']['ISOSpeedRatings'] . '</span></div>';
    }
    if ($mg_exifoptions[datime] and ($exif['IFD0']['DateTime'] or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('Date and Time', 'myGallery') . ': <span class="exifdata' . $class . '">' . $exif['IFD0']['DateTime'] . '</span></div>';
    }
    $tmp_ep = $exif['EXIF']['ExposureProgram'];
    if (array_key_exists($tmp_ep, $exposureprogram)) {
        $tpm_epv = $exposureprogram[$tmp_ep];
    }
    if ($mg_exifoptions[expro] and ($tpm_epv or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div class="exiflabel' . $class . '">' . __('Exposure Program', 'myGallery') . ': <span class="exifdata' . $class . '">' . $tpm_epv . '</span></div>';
    }
    $tmp_flash = getbit(decbin($exif['EXIF']['Flash']), 0);
    if ($tmp_flash == '0') {
        $tmp_flashvalue = __('no', 'myGallery');
    } else {
        if ($tmp_flash == '1') {
            $tmp_flashvalue = __('yes', 'myGallery');
        }
    }
    if ($mg_exifoptions[flash] and ($tmp_flashvalue or !$mg_exifoptions[exifskipempty])) {
        $class = 'one' == $class ? 'two' : 'one';
        $myexifinfo = $myexifinfo . '<div  class="exiflabel' . $class . '">' . __('Flash', 'myGallery') . ': <span  class="exifdata' . $class . '">' . $tmp_flashvalue . '</span></div>';
    }
    $myexifinfo = $myexifinfo . '</div>';
    return $myexifinfo;
}
Exemple #2
0
				<button class="btn brd">Logout</button>
			</form>
		</span><div></div></div>
		<?php 
if ($admin) {
    ?>
		<div class="admin">
			<h3>Administration</h3>
			<form action="account" method="post">
			<div class="row"><span>User</span><div>Permissions</div></div>
			<?php 
    //array_pop($level);
    $res = $mysqli->query('SELECT * FROM ' . TBL_USR);
    while ($row = $res->fetch_assoc()) {
        echo '<div class="row"><span>' . $row['name'] . '</span><div>';
        echo '<select name="u' . $row['id'] . '">';
        foreach ($level as $key => $val) {
            $sel = getbit($key) == $row['priv'] ? ' selected' : '';
            echo '<option value="' . getbit($key) . '"' . $sel . '>' . ucfirst($val) . '</option>';
        }
        echo '</select></div></div>';
    }
    ?>
			<div class="row">
				<input type="hidden" id="ignore" value="1" checked>
				<button class="btn btn-blu">Save</button>
			</div>
			</form>
		</div>
		<?php 
}