Example #1
0
    ?>

<?php 
    if ($ad_shop) {
        ?>
<div class="dg_head_background"<?php 
        echo checkBasket();
        ?>
><?php 
        echo JText::_('COM_DATSOGALLERY_BASKET_ITEMS');
        ?>
 <span id="items"><?php 
        countItems();
        ?>
</span> <?php 
        echo dgTip(JText::_('COM_DATSOGALLERY_CHECKOUT'), $image = 'basket_go.png', '', JRoute::_('index.php?option=com_datsogallery&amp;task=checkout' . $itemid), '', $link = 1);
        ?>
 <div style="float: right"><?php 
        echo JText::_('COM_DATSOGALLERY_BASKET_SUBTOTAL');
        ?>
: <?php 
        echo currencySymbol($ad_pp_currency);
        ?>
<span id="subtotal"><?php 
        echo subTotal();
        ?>
</span></div></div>
<div id="dg_body_background_basket" class="dg_slider"<?php 
        echo checkBasket();
        ?>
>
function writDir($folder)
{
    jimport('joomla.filesystem.folder');
    $writeable = dgTip(JText::_('COM_DATSOGALLERY_DIR_IS_WRITEABLE'), 'dg-accept-icon.png');
    $unwriteable = dgTip(JText::_('COM_DATSOGALLERY_DIR_IS_UNWRITEABLE'), 'dg-exclamation-icon.png');
    echo JFolder::exists($folder) ? $writeable : $unwriteable;
}
Example #3
0
function exifData($imagefile)
{
    require JPATH_COMPONENT_ADMINISTRATOR . DS . 'config.datsogallery.php';
    if (function_exists('exif_read_data')) {
        if ($ad_exif) {
            $ext = strtolower(substr(strrchr(JPATH_SITE . $ad_pathoriginals . DS . $imagefile, '.'), 1));
            if ($ext == 'jpg' || $ext == 'jpeg') {
                $exif_data = @exif_read_data(JPATH_SITE . $ad_pathoriginals . DS . $imagefile, 'IFD0');
                $dg_exif = "";
                if (isset($exif_data['Make']) != "") {
                    echo "<span>";
                    if ($exif_data['Make']) {
                        $dg_exif .= "<span class=exifcamera>" . $exif_data['Make'] . "</span><br />";
                    }
                    if (isset($exif_data['Model']) != "") {
                        $dg_exif .= "<span class=exifgray>" . JText::_('COM_DATSOGALLERY_EXIF_MODEL') . ": <span class=exifolivedrab>" . $exif_data['Model'] . "</span></span><br />";
                    }
                    if (isset($exif_data['ExposureTime']) != "") {
                        $dg_exif .= "<span class=exifgray>" . JText::_('COM_DATSOGALLERY_EXIF_EXPOSURE') . ": <span class=exifolivedrab>" . sprintf('%s (%01.3f sec)', simplifyFraction($exif_data['ExposureTime']), evalRational($exif_data['ExposureTime'])) . "</span></span><br />";
                    }
                    if (isset($exif_data['FNumber']) != "") {
                        $dg_exif .= "<span class=exifgray>" . JText::_('COM_DATSOGALLERY_EXIF_APERTURE') . ": <span class=exifolivedrab>" . sprintf('f/%01.1f', evalRational($exif_data['FNumber'])) . "</span></span><br />";
                    }
                    if (isset($exif_data['FocalLength']) != "") {
                        $dg_exif .= "<span class=exifgray>" . JText::_('COM_DATSOGALLERY_EXIF_FOCALLENGTH') . ": <span class=exifolivedrab>" . sprintf('%01.1f mm', evalRational($exif_data['FocalLength'])) . "</span></span><br />";
                    }
                    if (isset($exif_data['ISOSpeedRatings']) != "") {
                        $dg_exif .= "<span class=exifgray>" . JText::_('COM_DATSOGALLERY_EXIF_ISO') . ": <span class=exifolivedrab>" . $exif_data['ISOSpeedRatings'] . "</span></span><br />";
                    }
                    if (isset($exif_data['DateTime']) != "") {
                        $dg_exif .= "<span class=exifgray>" . JText::_('COM_DATSOGALLERY_EXIF_DATETIME') . ": <span class=exifolivedrab>" . $exif_data['DateTime'] . "</span></span><p></p>";
                    }
                    return '<strong>EXIF</strong>: ' . dgTip($dg_exif, 'camera.png', '', '', 0);
                    echo "</span>";
                }
            }
        }
    }
}
Example #4
0
              <label for="ad_technorati">
              <img src="<?php 
echo JURI::root();
?>
components/com_datsogallery/images/customtheme/bookmarker/technorati.png" title="Technorati" alt="" />
              <?php 
$yn_ad_technorati = JHTML::_('select.booleanlist', 'ad_technorati', '', $ad_technorati);
echo $yn_ad_technorati;
?>
              </label>
              </fieldset>
             </td>
          </tr>
        </table></td>
      <td valign="top"><?php 
echo dgTip(JText::_('COM_DATSOGALLERY_BOOKMARKER_SERVICES_TIP'));
?>
</td>
    </tr>
  </table>
</fieldset>

<?php 
echo $tabs->endPanel();
echo $tabs->startPanel(JText::_('COM_DATSOGALLERY_COMPONENT_INFO'), "tab9");
?>

<fieldset class="adminform">
  <legend>&nbsp;<?php 
echo JText::_('COM_DATSOGALLERY_COMPONENT_INFO1');
?>
    function editPicture(&$row, &$clist, &$ad_pathoriginals, &$ad_thumbwidth, &$ad_thumbheight, &$ad_crop, &$ad_cropratio)
    {
        $app = JFactory::getApplication('administrator');
        $user = JFactory::getUser();
        $ad_pathoriginals = JPath::clean($ad_pathoriginals);
        $info = getimagesize(JPATH_SITE . $ad_pathoriginals . DS . $row->imgoriginalname);
        $size = filesize(JPATH_SITE . $ad_pathoriginals . DS . $row->imgoriginalname);
        require JPATH_COMPONENT . DS . 'config.datsogallery.php';
        ?>
  <script type="text/javascript">
    Joomla.submitbutton = function(task) {
        var form = document.adminForm;
        if (form.imgtitle.value == '') {
            alert('<?php 
        echo JText::_('COM_DATSOGALLERY_ENTER_IMAGE_TITLE');
        ?>
');
            return false;
        } else if (form.catid.value == 0) {
            alert('<?php 
        echo JText::_('COM_DATSOGALLERY_SELECT_CATEGORY');
        ?>
');
            return false;
        } else {
            submitform(task);
            return true;
        }
        if (task == 'cancel') {
            submitform(task);
            return true;
        }
    }
  </script>
  <table width="100%" class="admintable">
    <tr>
      <td width="40%" valign="top">
        <form action="index.php" method="post" name="adminForm" id="adminForm">
        <fieldset style="min-height: 300px" class="adminform">
         <legend>&nbsp;<?php 
        echo JText::_('COM_DATSOGALLERY_IMAGE_DATA');
        ?>
&nbsp;</legend>
          <table class="admintable">
            <tr>
              <td width="200"><b><?php 
        echo JText::_('COM_DATSOGALLERY_IMAGE_TITLE');
        ?>
:</b></td>
              <td width="300"><input class="inputbox" type="text" name="imgtitle" size="39" maxlength="100" value="<?php 
        echo $row->imgtitle;
        ?>
" /></td>
            </tr>
            <tr>
              <td><b><?php 
        echo JText::_('COM_DATSOGALLERY_CATEGORY');
        ?>
:</b></td>
              <td><?php 
        echo $clist;
        ?>
</td>
            </tr>
            <tr>
              <td valign="top"><b><?php 
        echo JText::_('COM_DATSOGALLERY_DESCRIPTION');
        ?>
:</b></td>
              <td>
                <?php 
        $editor =& JFactory::getEditor();
        echo $editor->display('imgtext', htmlspecialchars($row->imgtext, ENT_QUOTES), '550', '300', '60', '20', array('image', 'pagebreak', 'readmore'));
        ?>
                </td>
            </tr>
            <tr>
              <td><b><?php 
        echo JText::_('COM_DATSOGALLERY_IMAGE_AUTHOR');
        ?>
:</b></td>
              <td><input class="inputbox" type="text" name="imgauthor" value="<?php 
        echo $row->imgauthor;
        ?>
" size="39" maxlength="100" /></td>
            </tr>
            <tr>
              <td><b><?php 
        echo JText::_('COM_DATSOGALLERY_IMAGE_AUTHOR_URL');
        ?>
:</b></td>
              <td><input class="inputbox" type="text" name="imgauthorurl" value="<?php 
        echo $row->imgauthorurl;
        ?>
" size="39" maxlength="100" /></td>
            </tr>
            <?php 
        if ($ad_shop) {
            ?>
            <tr>
              <td><b><?php 
            echo JText::_('COM_DATSOGALLERY_PRICE');
            ?>
:</b></td>
              <td><input class="inputbox" type="text" name="imgprice" value="<?php 
            echo $row->imgprice;
            ?>
" size="12" maxlength="100" />&nbsp;<?php 
            echo dgTip(JText::_('COM_DATSOGALLERY_PRICE_DESC'));
            ?>
</td>
            </tr>
             <?php 
        }
        ?>
          </table>
          <input type="hidden" name="option" value="com_datsogallery" />
          <input type="hidden" name="task" value="save" />
          <input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
          <input type="hidden" name="owner_id" value="<?php 
        if ($row->owner_id) {
            echo $row->owner_id;
        } else {
            echo $user->id;
        }
        ?>
" />
          <input type="hidden" name="approved" value="<?php 
        if ($row->approved == 0) {
            echo "1";
        } else {
            echo $row->approved;
        }
        ?>
" />
          </fieldset>
          <?php 
        echo JHTML::_('form.token');
        ?>
        </form></td>
      <td width="60%" valign="top">
    <?php 
        $type = array(1 => 'GIF', 2 => 'JPG', 3 => 'PNG');
        $info[2] = $type[$info[2]];
        $fsize = format_filesize($size);
        $orginfo = '<table>';
        $orginfo .= '<tr>';
        $orginfo .= '<td>';
        $orginfo .= JText::_('COM_DATSOGALLERY_ORG_WIDTH');
        $orginfo .= '</td>';
        $orginfo .= '<td>: ';
        $orginfo .= $info[0] . ' ' . JText::_('COM_DATSOGALLERY_PIXELS');
        $orginfo .= '</td>';
        $orginfo .= '</tr>';
        $orginfo .= '<tr>';
        $orginfo .= '<td>';
        $orginfo .= JText::_('COM_DATSOGALLERY_ORG_HEIGHT');
        $orginfo .= '</td>';
        $orginfo .= '<td>: ';
        $orginfo .= $info[1] . ' ' . JText::_('COM_DATSOGALLERY_PIXELS');
        $orginfo .= '</td>';
        $orginfo .= '</tr>';
        $orginfo .= '<tr>';
        $orginfo .= '<td>';
        $orginfo .= JText::_('COM_DATSOGALLERY_ORG_TYPE');
        $orginfo .= '</td>';
        $orginfo .= '<td>: ';
        $orginfo .= $info[2];
        $orginfo .= '</td>';
        $orginfo .= '</tr>';
        $orginfo .= '<tr>';
        $orginfo .= '<td>';
        $orginfo .= JText::_('COM_DATSOGALLERY_FILESIZE');
        $orginfo .= '</td>';
        $orginfo .= '<td>: ';
        $orginfo .= $fsize;
        $orginfo .= '</td>';
        $orginfo .= '</tr>';
        $orginfo .= '</table>';
        ?>
    <fieldset style="min-height:300px;width:220px" class="adminform">
       <legend>&nbsp;<?php 
        echo JText::_('COM_DATSOGALLERY_IMAGE_INFO');
        ?>
&nbsp;</legend>
        <table class="admintable">
          <tr>
            <td>
                <div align="center"><img src="<?php 
        echo resize($row->imgoriginalname, $ad_thumbwidth, $ad_thumbheight, $ad_crop, $ad_cropratio, 0, $row->catid);
        ?>
" class="dgimg" title="<?php 
        echo JText::_('COM_DATSOGALLERY_IMAGE_PREVIEW');
        ?>
" /></div>
                <br />
                <br />
                <?php 
        echo $orginfo;
        ?>
            </td>
          </tr>
        </table>
        </fieldset>
      </td>
    </tr>
  </table>
  <?php 
    }