

Public Member Functions | |
| add ($str) | |
| Add a string in notify widget. | |
| display () | |
| private internal function | |
| flush () | |
| get () | |
| private internal function | |
| getImgLevel () | |
| private internal function | |
| getLevel () | |
| private internal function | |
| getSize () | |
| private internal function | |
| NotifyWidget () | |
| default constructor | |
| NotifyWidgetWarning ($message) | |
| setLevel ($level) | |
| set level (change icon in widget) | |
| setSize ($size) | |
| set width size | |
| showJS () | |
| private internal function | |
Definition at line 1828 of file PageGenerator.php.
| NotifyWidget::add | ( | $ | str | ) | [inherited] |
Add a string in notify widget.
| $str | any HTML CODE |
Definition at line 1676 of file PageGenerator.php.
01676 { 01677 01678 if (!isset($_SESSION['__notify'])) { 01679 $_SESSION['__notify'] = array(); 01680 } 01681 $_SESSION['__notify'][] = $str; 01682 }
| NotifyWidget::display | ( | ) | [inherited] |
private internal function
Definition at line 1766 of file PageGenerator.php.
01766 { 01767 # if this function has already been launch, no need for a second launch 01768 global $doneDisplay; 01769 if ($doneDisplay) { return; } 01770 $doneDisplay = True; 01771 if (!isset($_SESSION['__notify'])) { 01772 return; 01773 } 01774 echo '<table style="border-width: 0 0 0 0; border-style: none;"><tr style="border-width: 0 0 0 0; border-style: none;"><td style="border-width: 0 0 0 0; border-style: none;">'; 01775 echo '<div id="popupicon" style="float: left;"><img src="'.$this->getImgLevel().'"></div>'; 01776 echo '</td><td style="vertical-align: center; border-width: 0 0 0 0; text-align: justify; width:100%;">'; 01777 foreach ($_SESSION['__notify'] as $info) { 01778 echo "<p style=\"margin: auto;\">$info</p>"; 01779 } 01780 echo '<div style="text-align: center; padding-top: 10px">'; 01781 echo '<input name="breset" type="reset" class="btnSecondary" onclick="getStyleObject(\'popup\').display=\'none\'; return false;" value="'._("Ok").'" />'; 01782 echo '</div>'; 01783 echo '</td></tr></table>'; 01784 $this->flush(); 01785 }
| NotifyWidget::flush | ( | ) | [inherited] |
Definition at line 1787 of file PageGenerator.php.
01787 { 01788 unset($_SESSION['__notify']); 01789 unset ($_SESSION['__notify_size']); 01790 unset ($_SESSION['__notify_level']); 01791 }
| NotifyWidget::get | ( | ) | [inherited] |
private internal function
Definition at line 1741 of file PageGenerator.php.
01741 { 01742 $_SESSION['__notify']; 01743 }
| NotifyWidget::getImgLevel | ( | ) | [inherited] |
private internal function
Definition at line 1729 of file PageGenerator.php.
01729 { 01730 if ($this->getLevel()!=0) { 01731 return "img/common/icn_alert.gif"; 01732 } 01733 01734 return "img/common/big_icn_info.png"; 01735 01736 }
| NotifyWidget::getLevel | ( | ) | [inherited] |
private internal function
Definition at line 1718 of file PageGenerator.php.
01718 { 01719 if ($_SESSION['__notify_level']) { 01720 return $_SESSION['__notify_level']; 01721 } else { 01722 return 0; //default level is 0 01723 } 01724 }
| NotifyWidget::getSize | ( | ) | [inherited] |
private internal function
Definition at line 1695 of file PageGenerator.php.
01695 { 01696 if ($_SESSION['__notify_size']) { 01697 return $_SESSION['__notify_size']; 01698 } else { 01699 return 300; //default value 01700 } 01701 }
| NotifyWidget::NotifyWidget | ( | ) | [inherited] |
| NotifyWidgetWarning::NotifyWidgetWarning | ( | $ | message | ) |
Definition at line 1830 of file PageGenerator.php.
01830 { 01831 $this->flush(); 01832 $this->add("<div id=\"warningCode\">$message</div>"); 01833 $this->setLevel(3); 01834 $this->setSize(600); 01835 }
| NotifyWidget::setLevel | ( | $ | level | ) | [inherited] |
set level (change icon in widget)
| $level | level must be beetween 0 and 5 level must be beetween 0,5 0: info (default, blue info bubble) <= 1: error for the moment (red icon) 5 is critical |
Definition at line 1711 of file PageGenerator.php.
01711 { 01712 $_SESSION['__notify_level'] = $level; 01713 }
| NotifyWidget::setSize | ( | $ | size | ) | [inherited] |
set width size
| $size | size in px |
Definition at line 1688 of file PageGenerator.php.
01688 { 01689 $_SESSION['__notify_size'] = $size; 01690 }
| NotifyWidget::showJS | ( | ) | [inherited] |
private internal function
Definition at line 1748 of file PageGenerator.php.
01748 { 01749 # if this function has already been launch, no need for a second launch 01750 global $doneJS; 01751 if ($doneJS) { return; } 01752 $doneJS = True; 01753 if (!isset($_SESSION['__notify'])) { 01754 return; 01755 } 01756 echo "<script>\n"; 01757 echo "$('popup').style.width='".$this->getSize()."px';"; 01758 echo " showPopupCenter('includes/notify.php');"; 01759 echo "</script>\n"; 01760 }
1.5.8