Ejemplo n.º 1
0
<input type="text" id="txtImageHeight" name="txtImageHeight" maxlength="10" value="<?php 
echo $Image->getImageHeight();
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableControls);
?>
 />
</div>

<div class="FormRow">
<label for="txtTags"><?php 
echo $lang->g('LabelTags');
?>
 (CSV):</label>
<input type="text" id="txtTags" name="txtTags" maxlength="400" class="TagsBox" value="<?php 
echo Tag2All::Tags2AllCSV($TagsThisImage);
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableControls);
?>
 />
</div>

<div class="FormRow"><label>&nbsp;</label>
<input type="submit" class="FormButton" value="<?php 
echo $DeleteImage ? $lang->g('ButtonDelete') : $lang->g('ButtonSave');
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableDefaultButton);
?>
 />
Ejemplo n.º 2
0
<input type="text" id="txtFileCRC32" name="txtFileCRC32" maxlength="8" value="<?php 
echo $Video->getFileCRC32();
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableControls);
?>
 />
</div>

<div class="FormRow">
<label for="txtTags"><?php 
echo $lang->g('LabelTags');
?>
 (CSV):</label>
<input type="text" id="txtTags" name="txtTags" maxlength="400" class="TagsBox" value="<?php 
echo Tag2All::Tags2AllCSV($TagsThisVideo);
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableControls);
?>
 />
</div>

<div class="FormRow"><label>&nbsp;</label>
<input type="submit" class="FormButton" value="<?php 
echo $DeleteVideo ? $lang->g('ButtonDelete') : $lang->g('ButtonSave');
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableDefaultButton);
?>
 />
Ejemplo n.º 3
0
foreach ($DatesThisSet as $Date) {
    if ($Date->getDateKind() == DATE_KIND_VIDEO || $Date->getDateKind() == DATE_KIND_UNKNOWN) {
        if (!$DeleteSet || $Date->getTimeStamp() > 0) {
            echo HTMLstuff::DateFormField($Date->getID(), Date::FormatDates(array($Date), 'Y-m-d'), DATE_KIND_VIDEO, $DisableControls);
        }
    }
}
?>

<div class="FormRow">
<label for="txtTags"><?php 
echo $lang->g('LabelTags');
?>
 (CSV):</label>
<input type="text" id="txtTags" name="txtTags" maxlength="400" class="TagsBox" value="<?php 
echo Tag2All::Tags2AllCSV($TagsThisSet);
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableControls);
?>
 />
</div>

<div class="FormRow">
<label>&nbsp;</label>
<input type="submit" class="FormButton" value="<?php 
echo $DeleteSet ? $lang->g('ButtonDelete') : $lang->g('ButtonSave');
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableDefaultButton);
?>
Ejemplo n.º 4
0
function XmlOutputModel($Model, $TaggedOnly)
{
    global $xmlw, $Sets, $Dates, $Tag2Alls, $IncludeImages, $IncludeVideos;
    $xmlw->startElement('Model');
    $xmlw->writeAttribute('firstname', $Model->getFirstName());
    $xmlw->writeAttribute('lastname', $Model->getLastName());
    $xmlw->writeAttribute('birthdate', $Model->getBirthdate() > 0 ? date('Y-m-d', $Model->getBirthdate()) : NULL);
    $TagsThisModel = Tag2All::Filter($Tag2Alls, NULL, $Model->getID(), FALSE, FALSE, FALSE);
    $TagsThisModelOnly = Tag2All::Filter($TagsThisModel, NULL, $Model->getID(), NULL, NULL, NULL);
    $xmlw->writeAttribute('tags', Tag2All::Tags2AllCSV($TagsThisModelOnly));
    $SetsThisModel = Set::Filter($Sets, $Model->getID());
    if ($SetsThisModel) {
        $xmlw->startElement('Sets');
        $DatesThisModel = Date::FilterDates($Dates, NULL, $Model->getID());
        if ($Model->getFirstName() == 'VIP') {
            usort($SetsThisModel, array('Set', 'CompareASC'));
        }
        foreach ($SetsThisModel as $Set) {
            $PicDatesThisSet = Date::FilterDates($DatesThisModel, NULL, NULL, $Set->getID(), DATE_KIND_IMAGE);
            $VidDatesThisSet = Date::FilterDates($DatesThisModel, NULL, NULL, $Set->getID(), DATE_KIND_VIDEO);
            $TagsThisSet = Tag2All::Filter($TagsThisModel, NULL, $Model->getID(), $Set->getID(), NULL, NULL);
            $xmlw->startElement('Set');
            if ($Model->getFirstName() == 'VIP' && !is_numeric($Set->getName())) {
                $xmlw->writeAttribute('name', sprintf('SP_%1$s', $Set->getName()));
            } else {
                $xmlw->writeAttribute('name', $Set->getName());
            }
            $xmlw->writeAttribute('date_pic', Date::FormatDates($PicDatesThisSet, 'Y-m-d', FALSE, ' '));
            $xmlw->writeAttribute('date_vid', Date::FormatDates($VidDatesThisSet, 'Y-m-d', FALSE, ' '));
            $xmlw->writeAttribute('tags', Tag2All::Tags2AllCSV($TagsThisSet));
            if ($IncludeImages) {
                $ImagesThisSet = Image::GetImages(new ImageSearchParameters(FALSE, FALSE, $Set->getID(), FALSE, $Model->getID()));
                if ($ImagesThisSet) {
                    $xmlw->startElement('Images');
                    /* @var $Image Image */
                    foreach ($ImagesThisSet as $Image) {
                        $TagsThisImage = Tag2All::Filter($TagsThisModel, NULL, $Model->getID(), $Set->getID(), $Image->getID(), NULL);
                        if ($TaggedOnly === TRUE && $TagsThisImage || $TaggedOnly === FALSE) {
                            $xmlw->startElement('Image');
                            $xmlw->writeAttribute('name', $Image->getFileName());
                            $xmlw->writeAttribute('extension', $Image->getFileExtension());
                            $xmlw->writeAttribute('filesize', $Image->getFileSize());
                            $xmlw->writeAttribute('height', $Image->getImageHeight());
                            $xmlw->writeAttribute('width', $Image->getImageWidth());
                            $xmlw->writeAttribute('checksum', $Image->getFileCheckSum());
                            $xmlw->writeAttribute('crc32', $Image->getFileCRC32());
                            $xmlw->writeAttribute('tags', Tag2All::Tags2AllCSV($TagsThisImage));
                            $xmlw->endElement();
                        }
                    }
                    $xmlw->endElement();
                    $xmlw->flush();
                    ob_flush();
                    flush();
                    unset($ImagesThisSet);
                }
            }
            if ($IncludeVideos) {
                $VideosThisSet = Video::GetVideos(new VideoSearchParameters(FALSE, FALSE, $Set->getID(), FALSE, $Model->getID()));
                if ($VideosThisSet) {
                    $xmlw->startElement('Videos');
                    /* @var $Video Video */
                    foreach ($VideosThisSet as $Video) {
                        $TagsThisVideo = Tag2All::Filter($TagsThisModel, NULL, $Model->getID(), $Set->getID(), NULL, $Video->getID());
                        if ($TaggedOnly === TRUE && $TagsThisVideo || $TaggedOnly === FALSE) {
                            $xmlw->startElement('Video');
                            $xmlw->writeAttribute('name', $Video->getFileName());
                            $xmlw->writeAttribute('extension', $Video->getFileExtension());
                            $xmlw->writeAttribute('filesize', $Video->getFileSize());
                            $xmlw->writeAttribute('checksum', $Video->getFileCheckSum());
                            $xmlw->writeAttribute('crc32', $Video->getFileCRC32());
                            $xmlw->writeAttribute('tags', Tag2All::Tags2AllCSV($TagsThisVideo));
                            $xmlw->endElement();
                        }
                    }
                    $xmlw->endElement();
                    $xmlw->flush();
                    ob_flush();
                    flush();
                    unset($VideosThisSet);
                }
            }
            $xmlw->endElement();
        }
        $xmlw->endElement();
        $xmlw->flush();
        ob_flush();
        flush();
        if ($Model->getRemarks()) {
            $xmlw->startElement('Remarks');
            $xmlw->text($Model->getRemarks());
            $xmlw->endElement();
        }
    }
    $xmlw->endElement();
    $xmlw->flush();
    ob_flush();
    flush();
}
Ejemplo n.º 5
0
<input type="text" id="txtBirthDate" name="txtBirthDate" class="DatePicker"	maxlength="10" value="<?php 
echo $Model->getBirthDate() > 0 ? date('Y-m-d', $Model->getBirthDate()) : NULL;
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableControls);
?>
 />
</div>

<div class="FormRow">
<label for="txtTags"><?php 
echo $lang->g('LabelTags');
?>
 (CSV):</label>
<input type="text" id="txtTags" name="txtTags" maxlength="400" class="TagsBox" value="<?php 
echo Tag2All::Tags2AllCSV($TagsThisModel);
?>
"<?php 
echo HTMLstuff::DisabledStr($DisableControls);
?>
 />
</div>

<div class="FormRow">
<label for="txtRemarks"><?php 
echo $lang->g('LabelRemarks');
?>
:</label>
<textarea id="txtRemarks" name="txtRemarks" cols="42" rows="16" <?php 
echo HTMLstuff::DisabledStr($DisableControls);
?>
Ejemplo n.º 6
0
 function XmlOutputModel($Model)
 {
     global $xmlw, $Sets, $Dates, $Tag2Alls, $IncludeImages, $IncludeVideos;
     $xmlw->startElement('Model');
     $xmlw->writeAttribute('firstname', $Model->getFirstName());
     $xmlw->writeAttribute('lastname', $Model->getLastName());
     $xmlw->writeAttribute('birthdate', $Model->getBirthdate() > 0 ? date('Y-m-d', $Model->getBirthdate()) : NULL);
     $TagsThisModel = Tag2All::Filter($Tag2Alls, NULL, $Model->getID(), FALSE, FALSE, FALSE);
     $TagsThisModelOnly = Tag2All::Filter($TagsThisModel, NULL, $Model->getID(), NULL, NULL, NULL);
     $xmlw->writeAttribute('tags', Tag2All::Tags2AllCSV($TagsThisModelOnly));
     $SetsThisModel = Set::Filter($Sets, $Model->getID());
     if ($SetsThisModel) {
         $xmlw->startElement('Sets');
         $DatesThisModel = Date::FilterDates($Dates, NULL, $Model->getID());
         if ($Model->getFirstName() == 'VIP') {
             usort($SetsThisModel, array('Set', 'CompareASC'));
         }
         foreach ($SetsThisModel as $Set) {
             $PicDatesThisSet = Date::FilterDates($DatesThisModel, NULL, NULL, $Set->getID(), DATE_KIND_IMAGE);
             $VidDatesThisSet = Date::FilterDates($DatesThisModel, NULL, NULL, $Set->getID(), DATE_KIND_VIDEO);
             $TagsThisSet = Tag2All::Filter($TagsThisModel, NULL, $Model->getID(), $Set->getID(), NULL, NULL);
             $xmlw->startElement('Set');
             if ($Model->getFirstName() == 'VIP' && !is_numeric($Set->getName())) {
                 $xmlw->writeAttribute('name', sprintf('SP_%1$s', $Set->getName()));
             } else {
                 $xmlw->writeAttribute('name', $Set->getName());
             }
             $xmlw->writeAttribute('date_pic', Date::FormatDates($PicDatesThisSet, 'Y-m-d', FALSE, ' '));
             $xmlw->writeAttribute('date_vid', Date::FormatDates($VidDatesThisSet, 'Y-m-d', FALSE, ' '));
             $xmlw->writeAttribute('tags', Tag2All::Tags2AllCSV($TagsThisSet));
             $xmlw->endElement();
         }
         $xmlw->endElement();
         $xmlw->flush();
         ob_flush();
         flush();
         if ($Model->getRemarks()) {
             $xmlw->startElement('Remarks');
             $xmlw->text($Model->getRemarks());
             $xmlw->endElement();
         }
     }
     $xmlw->endElement();
     $xmlw->flush();
     ob_flush();
     flush();
 }