Esempio n. 1
0
 /**
  * render the toolbar
  */
 public function render($type = 'default')
 {
     if (array_key_exists($type, $this->toolbars)) {
         $tb = $this->toolbars[$type];
         $c = count($tb);
         if ($c != 0) {
             echo '<div id="toolbar-' . $type . '">';
             echo '<ul>';
             for ($i = 0; $i < $c; $i++) {
                 $elm = $tb[$i];
                 $name = substr($elm->image, 0, strpos($elm->image, '.'));
                 if (in_array($name, $this->iconset)) {
                     echo '<li class="icon-32-' . $name . '">';
                     //echo '<li>';
                 } else {
                     $ipath = $this->getIconPath('icon-32-' . $elm->image);
                     if ($ipath === null) {
                         // standard icon
                         echo '<li class="icon-32-default">';
                         //echo '<li>';
                     } else {
                         echo '<li style="background-image:url(' . $ipath . ');background-repeat:no-repeat;">';
                         //echo '<li>';
                     }
                 }
                 echo "\n" . '<a href="javascript:';
                 if ($elm->listSelect) {
                     $seltext = RdbsText::_('RDBS_SPLL_TOOLBARSEL' . strtoupper($elm->task));
                     echo "if(document.adminForm.boxchecked.value == 0){ alert('" . $seltext . "'); } else";
                     if ($elm->confirm) {
                         $confirmtext = RdbsText::_('RDBS_SPLL_TOOLBARCONFIRM' . strtoupper($elm->task));
                         echo " if (confirm('" . $confirmtext . "')) ";
                     }
                     echo "{ submitbutton('" . $elm->task . "');}\"";
                 } else {
                     echo 'submitbutton(\'' . $elm->task . '\');"';
                 }
                 echo '>';
                 echo RdbsText::_($elm->name);
                 echo '</a></li>';
             }
             echo '</ul>';
             echo '</div>';
         }
     }
 }
Esempio n. 2
0
 **/
defined('_JEXEC') or die('Restricted access');
if ($this->elm['error'] == 1) {
    echo '<div class="formelm fail">';
    echo '<p class="unsichtbar">' . RdbsText::_('RDBSLLSP_FORMELMERROR') . '</p>';
    echo '<a name="error' . $this->errorcounter . '"></a>';
    $this->errorcounter++;
} else {
    echo '<div class="formelm">';
}
if (array_key_exists('labletag', $this->elm)) {
    $namedesc = strtoupper($this->elm['labletag']);
} else {
    $namedesc = strtoupper($this->elm['name']) . 'DESC';
}
echo '<label for="', $this->elm['name'], '" class="slib" >', RdbsText::_($namedesc);
echo $this->elm['mandatory'] ? ' *' : '';
echo ' </label>';
$txt = $this->elm['data'];
echo '<select class="time" name="' . $this->elm['name'] . '" id="', $this->elm['name'], '" size="1">';
foreach ($txt as $e) {
    echo '<option';
    echo $this->elm['value'] == $e ? ' selected="selected"' : '';
    echo ' value="' . $e . '">' . $e . '</option>';
}
echo '</select>';
if ($this->elm['error'] == 1 and $this->errorcounter < $this->errorcount) {
    echo '<a class="unsichtbar" href="#error' . $this->errorcounter . '">' . RdbsText::_('RDBSLLSP_JUMPTONEXTERROR') . '</a>';
}
echo '<div class="wrap">&nbsp;</div> ';
echo '</div>';
Esempio n. 3
0
 function checkoutProcessing($row, $rownum = 0, $resulttype = 'boolean', $overlib = 1, $checkoutfield = 'checked_out', $identifier = 'id', $formfield = 'cid')
 {
     $user =& RdbsFactory::getUser();
     $userid = $user->get('id');
     $checkout = false;
     // check member
     if (property_exists($row, $checkoutfield)) {
         if (!($row->{$checkoutfield} == $userid || $row->{$checkoutfield} == 0)) {
             $checkout = true;
         }
     }
     if ($resulttype == 'boolean') {
         return $checkout;
     } else {
         // return html code to display
         if ($checkout) {
             $checkoutByUserId = $row->{$checkoutfield};
             $user->load($checkoutByUserId);
             $name = $user->name;
             $hover = '';
             if ($overlib) {
                 $text = ':: ' . addslashes(htmlspecialchars($name));
                 $date = '';
                 $time = '';
                 if (property_exists($row, 'checked_out_time')) {
                     $date = RdbsHTML::_('date', $row->checked_out_time, '%A, %d %B %Y') . ' ';
                     $time = RdbsHTML::_('date', $row->checked_out_time, '%H:%M');
                 }
                 $hover = '<span class="editlinktip hasTip" title="' . RdbsText::_('Checked Out') . $text . ' ' . $date . $time . '">';
             }
             $hover = $hover . '<img src="images/checked_out.png"/></span>';
             return $hover;
         } else {
             return '<input type="checkbox" id="cb' . $rownum . '" name="' . $formfield . '[]" value="' . $row->{$identifier} . '" onclick="isChecked(this.checked);" />';
         }
     }
 }