Lines Matching refs:attribute

66 					$attribute = $this->template->getAttribute($attr);
68 if (! $attribute)
72 if ($attribute->getPostValue())
73 $this->get('Post',$attribute,$index);
75 $this->get('AutoPost',$attribute,$index);
78 foreach ($this->template->getAttributes(true) as $attribute) {
79 $this->visit('',$attribute);
125 protected function getPostAttribute($attribute,$i) { argument
126 $autovalue = $attribute->getPostValue();
129 $vals = $attribute->getValues();
153 …if (($pv = get_request(strtolower($joinattr),'REQUEST')) && isset($pv[$attribute->getName()][$i]))…
154 array_push($values,$pv[$attribute->getName()][$i]);
156 if (! $pv[$attribute->getName()][$i])
174 $attribute->getName(false),count($attribute->getValues())),
209 if (! $attribute->hasBeenModified())
226 if (! trim($passwordvalue) || in_array($passwordvalue,$attribute->getOldValues()))
266 $vals = $this->get('AutoPost',$attribute,$i);
269 if (! $vals || $vals == $attribute->getValues())
272 $attribute->clearValue();
275 $attribute->setValue(array($vals));
277 $attribute->setValue($vals);
321 final protected function drawNameAttribute($attribute) { argument
323 $this->getServerID(),$attribute->getName());
326 printf('%s',_($attribute->getFriendlyName()));
328 elseif ($attribute->getLDAPtype())
331 …lick to view the schema definition for attribute type'),$attribute->getName(false),_($attribute->g…
333 …>%s</acronym>',_('This attribute is not defined in the LDAP schema'),_($attribute->getFriendlyName…
338 protected function drawNotesAttribute($attribute) { argument
342 $alias_note = $this->get($note,$attribute);
356 protected function getNoteAliasAttribute($attribute) { argument
361 protected function getNoteRequiredAttribute($attribute) { argument
366 $sattr = $this->getServer()->getSchemaAttribute($attribute->getName());
398 protected function getNoteRDNAttribute($attribute) { argument
400 if ($attribute->isRDN())
406 protected function getNoteHintAttribute($attribute) { argument
408 if ($attribute->getHint())
409 return sprintf('<acronym title="%s">%s</acronym>',_($attribute->getHint()),_('hint'));
414 protected function getNoteROAttribute($attribute) { argument
423 foreach ($this->template->getAttributes(true) as $attribute)
424 if ($attribute->hasbeenModified()) {
425 if ($attribute->getValues())
426 foreach ($attribute->getValues() as $index => $details)
427 $this->draw('HiddenValue',$attribute,$index);
431 $this->draw('HiddenValue',$attribute,0);
438 final protected function drawHiddenValueAttribute($attribute,$i) { argument
439 $val = $attribute->getValue($i);
442 htmlspecialchars($attribute->getName()),$i,htmlspecialchars($attribute->getName()),$i,
447 protected function drawOldValuesAttribute($attribute) { argument
448 foreach ($attribute->getValues() as $index => $details)
449 $this->draw('OldValue',$attribute,$index);
452 final protected function drawOldValueAttribute($attribute,$i) { argument
453 echo $attribute->getOldValue($i);
458 protected function drawCurrentValuesAttribute($attribute) { argument
459 for ($i=0;$i<$attribute->getValueCount();$i++) {
463 $this->draw('CurrentValue',$attribute,$i);
470 final protected function drawCurrentValueAttribute($attribute,$i) { argument
471 echo htmlspecialchars($attribute->getValue($i));
477 protected function drawFormValueAttribute($attribute,$i) { argument
478 if ($this->getServer()->isReadOnly() || $attribute->isReadOnly()
479 …|| ($attribute->isRDN() && $this->template->getType() != 'creation' && $i < count($attribute->getV…
481 $this->draw('FormReadOnlyValue',$attribute,$i);
483 $this->draw('FormReadWriteValue',$attribute,$i);
486 if ($attribute->haveMoreValues() && $attribute->getValueCount() == $i+1)
487 printf('<div id="ajADDVALUE%s"></div>',$attribute->getName());
489 if ($attribute->getPostValue())
490 printf('<input type="hidden" name="post_value[%s][]" value="%s"/>',$attribute->getName(),$i);
493 protected function drawFormReadOnlyValueAttribute($attribute,$i) { argument
494 $val = $attribute->getValue($i);
497 …htmlspecialchars($attribute->getName()),$i,htmlspecialchars($attribute->getName()),$i,htmlspecialc…
500 protected function drawFormReadWriteValueAttribute($attribute,$i) { argument
501 $val = $attribute->getValue($i);
503 if ($attribute->getHelper() || $attribute->getVerify())
507 htmlspecialchars($attribute->getName()),$i,
508 htmlspecialchars($attribute->getName()),$i,
510 $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
511 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
512 ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
513 ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');
515 if ($attribute->getHelper()) {
517 $this->draw('AttributeHelper',$attribute,$i);
520 } elseif ($attribute->getVerify())
523 if ($attribute->getVerify()) {
525 htmlspecialchars($attribute->getName()),$i,
526 htmlspecialchars($attribute->getName()),$i,
527 ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
528 ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');
535 if ($attribute->getHelper() || $attribute->getVerify())
542 final protected function drawHiddenValueBinaryAttribute($attribute,$i) { argument
543 $val = $attribute->getValue($i);
546 htmlspecialchars($attribute->getName()),$i,base64_encode($val));
549 final protected function drawOldValueBinaryAttribute($attribute,$i) { argument
551 if (! $attribute->getOldValue($i))
557 final protected function drawCurrentValueBinaryAttribute($attribute,$i) { argument
560 if (in_array($attribute->getName(),array('objectsid')))
561 printf('<small> (%s)</small>', binSIDtoText($attribute->getValue(0)));
564 protected function drawFormReadOnlyValueBinaryAttribute($attribute,$i) { argument
565 $this->draw('CurrentValue',$attribute,$i);
569 $this->getServerID(),rawurlencode($this->template->getDN()),$attribute->getName(),$i);
577 protected function drawFormReadWriteValueBinaryAttribute($attribute,$i) { argument
578 if ($attribute->getValue($i)) {
579 $this->draw('FormReadOnlyValue',$attribute,$i);
581 …if (! $attribute->isReadOnly() && $_SESSION[APPCONFIG]->isCommandAvailable('script','delete_attr'))
583 $attribute->getName(),$attribute->getFriendlyName(),$i,IMGDIR,_('delete attribute'));
587 htmlspecialchars($attribute->getName()),$i,
588 htmlspecialchars($attribute->getName()),$i,
589 $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
590 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
591 ($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '',
592 ($attribute->getMaxLength() > 0) ? 'maxlength="'.$attribute->getMaxLength().'"' : '');
596 protected function drawFormReadWriteValueDateAttribute($attribute,$i) { argument
597 $val = $attribute->getValue($i);
601 $attribute->getName(),$i,
602 htmlspecialchars($attribute->getName()),$i,htmlspecialchars($val),
603 $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
604 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
605 ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
606 ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');
608 $this->draw('SelectorPopup',$attribute,$i);
612 protected function drawFormReadWriteValueDnAttribute($attribute,$i) { argument
613 $val = $attribute->getValue($i);
615 if ($attribute->getHelper())
618 $input_name = sprintf('new_values[%s][%s]',htmlspecialchars($attribute->getName()),$i);
619 $id = sprintf('new_values_%s_%s',htmlspecialchars($attribute->getName()),$i);
623 $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
624 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
625 ($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '',
626 ($attribute->getMaxLength() > 0) ? 'maxlength="'.$attribute->getMaxLength().'"' : '');
632 if ($attribute->getHelper()) {
634 $this->draw('Helper',$attribute,$i);
641 protected function drawFormReadWriteValueGidAttribute($attribute,$i) { argument
642 $this->drawFormReadWriteValueAttribute($attribute,$i);
645 $val = $attribute->getValue($i);
692 final protected function drawOldValueJpegAttribute($attribute,$i) { argument
694 if (! $attribute->getOldValue($i))
697 draw_jpeg_photo($this->getServer(),$this->template->getDN(),$attribute->getName(),$i,false,false);
703 final protected function drawCurrentValueJpegAttribute($attribute,$i) { argument
705 if (! $attribute->getValue($i))
709 if ($attribute->hasBeenModified()) {
710 $_SESSION['tmp'][$attribute->getName()][$i] = $attribute->getValue($i);
711 draw_jpeg_photo(null,$this->template->getDN(),$attribute->getName(),$i,false,false);
713 … draw_jpeg_photo($this->getServer(),$this->template->getDN(),$attribute->getName(),$i,false,false);
716 protected function drawFormReadOnlyValueJpegAttribute($attribute,$i) { argument
717 $this->draw('HiddenValue',$attribute,$i);
718 $_SESSION['tmp'][$attribute->getName()][$i] = $attribute->getValue($i);
720 draw_jpeg_photo(null,$this->template->getDN(),$attribute->getName(),$i,false,false);
723 protected function drawFormReadOnlyValueMultiLineAttribute($attribute,$i) { argument
724 $val = $attribute->getValue($i);
727 ($attribute->getRows() > 0) ? $attribute->getRows() : 5,
728 ($attribute->getCols() > 0) ? $attribute->getCols() : 100,
729 htmlspecialchars($attribute->getName()),$i,
730 htmlspecialchars($attribute->getName()),$i,
734 protected function drawFormReadWriteValueMultiLineAttribute($attribute,$i) { argument
735 $val = $attribute->getValue($i);
738 ($attribute->getRows() > 0) ? $attribute->getRows() : 5,
739 ($attribute->getCols() > 0) ? $attribute->getCols() : 100,
740 htmlspecialchars($attribute->getName()),$i,
741 htmlspecialchars($attribute->getName()),$i,
742 $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
743 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
747 protected function drawFormValueObjectClassAttribute($attribute,$i) { argument
748 $val = $attribute->getValue($i);
766 $this->draw('FormReadOnlyValue',$attribute,$i);
773 $this->draw('FormReadWriteValue',$attribute,$i);
776 protected function getAutoPostPasswordAttribute($attribute,$i) { argument
778 if (preg_match('/^\{.+\}.+/',$attribute->getValue($i)))
781 …$attribute->setPostValue(array('function'=>'PasswordEncrypt','args'=>sprintf('%%enc%%;%%%s%%',$att…
782 $this->get('Post',$attribute,$i);
785 protected function drawOldValuePasswordAttribute($attribute,$i) { argument
786 $val = $attribute->getOldValue($i);
791 echo nl2br(htmlspecialchars($attribute->getOldValue($i)));
794 final protected function drawCurrentValuePasswordAttribute($attribute,$i) { argument
795 $val = $attribute->getValue($i);
800 echo nl2br(htmlspecialchars($attribute->getValue($i)));
803 protected function drawFormReadOnlyValuePasswordAttribute($attribute,$i) { argument
805 $val = $attribute->getValue($i);
816 htmlspecialchars($attribute->getName()),$i,htmlspecialchars($attribute->getName()),
817 $i,htmlspecialchars($val),($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '');
820 $this->draw('CheckLink',$attribute,'new_values_'.htmlspecialchars($attribute->getName()).'_'.$i);
823 protected function drawFormReadWriteValuePasswordAttribute($attribute,$i) { argument
825 $val = $attribute->getValue($i);
838 $id = sprintf('new_values_%s_%s',htmlspecialchars($attribute->getName()),$i);
842 htmlspecialchars($attribute->getName()),$i,$id,
844 $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
845 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
846 ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
847 ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');
851 if ($attribute->getHelper())
852 $this->draw('Helper',$attribute,$i);
854 $this->draw('DefaultHelper',$attribute,$i);
858 if ($attribute->getVerify() && $obfuscate_password) {
860 htmlspecialchars($attribute->getName()),$i,
861 htmlspecialchars($attribute->getName()),$i,
862 ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
863 ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');
870 $this->draw('CheckLink',$attribute,$id);
874 protected function drawFormReadWriteValueSelectionAttribute($attribute,$i) { argument
875 if ($attribute->isMultiple()) {
881 $vals = $attribute->getValues();
884 …if (! $vals && ! is_null($attribute->getDefault()) && ! is_array($vals = $attribute->getDefault()))
885 $vals = array($attribute->getDefault());
887 if (($attribute->getSize() > 0) && ($attribute->getSize() < $attribute->getOptionCount())) {
890 htmlspecialchars($attribute->getName()),$attribute->getSize());
892 foreach ($attribute->getSelection() as $value => $description) {
897 htmlspecialchars($attribute->getName()),$j++,
898 $value,htmlspecialchars($attribute->getName()),htmlspecialchars($attribute->getName()),
907 htmlspecialchars($attribute->getName()),$j++,
908 $val,htmlspecialchars($attribute->getName()),
909 htmlspecialchars($attribute->getName()),$val);
919 foreach ($attribute->getSelection() as $value => $description) {
924 htmlspecialchars($attribute->getName()),$j++,
925 htmlspecialchars($attribute->getName()),$value,
926 … $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
927 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
935 htmlspecialchars($attribute->getName()),$j++,
936 htmlspecialchars($attribute->getName()),$val,
937 … $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
938 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
946 $val = $attribute->getValue($i) ? $attribute->getValue($i) : $attribute->getDefault();
948 if ($attribute->getHelper())
955 if ($attribute->isRequired() && ! count($attribute->getSelection()))
958 …able to define the appropriate selection values in the template file.',$attribute->getName(false)),
962 htmlspecialchars($attribute->getName()),
963 htmlspecialchars($attribute->getName()),$i,
964 $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
965 $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '');
967 foreach ($attribute->getSelection() as $value => $description) {
990 if ($attribute->getHelper()) {
992 $this->draw('Helper',$attribute,$i);
1004 private function shadow_date($attribute) { argument
1013 if (($attribute->getName() == 'shadowlastchange') && $shadow['lastchange'])
1016 elseif (($attribute->getName() == 'shadowmax') && ($shadow['max'] > 0) && $shadow['lastchange'])
1019 elseif (($attribute->getName() == 'shadowwarning') && ($attribute->getValue(0) > 0)
1021 $shadow_date = $shadow['lastchange']+$shadow['max']-$attribute->getValue(0);
1023 elseif (($attribute->getName() == 'shadowinactive') && ($attribute->getValue(0) > 0)
1025 $shadow_date = $shadow['lastchange']+$shadow['max']+$attribute->getValue(0);
1027 …elseif (($attribute->getName() == 'shadowmin') && ($attribute->getValue(0) > 0) && $shadow['lastch…
1028 $shadow_date = $shadow['lastchange']+$attribute->getValue(0);
1030 elseif (($attribute->getName() == 'shadowexpire') && ($attribute->getValue(0) > 0))
1040 protected function drawShadowDateShadowAttribute($attribute) { argument
1041 $shadow_before_today_attrs = arrayLower($attribute->shadow_before_today_attrs);
1042 $shadow_after_today_attrs = arrayLower($attribute->shadow_after_today_attrs);
1043 $shadow_date = $this->shadow_date($attribute);
1051 …if (($today < $shadow_date) && in_array(strtolower($attribute->getName()),$shadow_before_today_att…
1055 …elseif (($today > $shadow_date) && in_array(strtolower($attribute->getName()),$shadow_after_today_…
1066 protected function drawFormReadOnlyValueShadowAttribute($attribute,$i) { argument
1067 $this->drawFormReadOnlyValueAttribute($attribute,$i);
1068 $this->draw('ShadowDate',$attribute);
1071 protected function drawFormReadWriteValueShadowAttribute($attribute,$i) { argument
1072 $this->drawFormReadWriteValueAttribute($attribute,$i);
1073 $this->draw('ShadowDate',$attribute);