1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28:
29:
30: function select_skin($class = "") {
31: global $session, $db;
32: $current_skin = "";
33: if (!empty($session->skin)) {
34: $current_skin = $session->skin;
35: } elseif (isset($_SESSION['skin'])) {
36: $current_skin = $_SESSION['skin'];
37: } elseif ($session && $session->logged_in) {
38: $user_skin = $db->getUserInfo($session->username, 'skin_name');
39: if (!empty($user_skin[0])) {
40: $current_skin = $user_skin[0];
41: }
42: }
43: if (empty($current_skin)) {
44: $current_skin = DEFAULT_SKIN;
45: }
46: $select = "<select ";
47: if (!empty($class)) {
48: $select .= "class='$class' ";
49: }
50: $select .= "name='skin' id='skin' size='1' onchange='changeSkin(this.value)'>\n";
51: echo ($select);
52: echo (" <option selected='selected' value='$current_skin'>$current_skin</option>\n");
53: $query = "SELECT skin_name FROM skins ORDER BY skin_id";
54: $db->send_query($query);
55: while($skin_name = $db->db_fetch_row()) {
56: if ($skin_name[0] != $current_skin) {
57: echo (" <option value='$skin_name[0]'>$skin_name[0]</option>\n");
58: }
59: }
60: $db->free_result();
61: echo ("</select>\n");
62: }
63:
64: function add_donate_button($button_nr = 1) {
65: global $session;
66: $lang = 'de';
67: if (isset($session->lang)) {
68: $lang = $session->lang;
69: }
70: switch ($button_nr) {
71: case 1:
72: $value = '5VCBZJRKXM9EC';
73: $button = "spenden_$lang.gif";
74: break;
75: case 2:
76: $value = '936L8TD998HF2';
77: $button = "spenden_big_$lang.gif";
78: break;
79: case 3:
80: $value = 'VJ9J7Z8MY7PBN';
81: $button = "spenden_big_$lang.gif";
82: break;
83: case 4:
84: $value = '5VCBZJRKXM9EC';
85: $button = "spenden_big_$lang.gif";
86: break;
87: }
88: echo ("<form action='https://www.paypal.com/cgi-bin/webscr' method='post' target='_blank'>\n");
89: echo (" <input type='hidden' name='cmd' value='_s-xclick'>\n");
90: echo (" <input type='hidden' name='hosted_button_id' value='$value'>\n");
91: echo (" <input type='image' onclick=\"_paq.push(['trackGoal', 6])\" src='img/$button' name='submit' alt='" . _("Donations") . "' title='" . _("Every donation is very welcome and helps the development of OpenHomeopath.") . "'>\n");
92: echo (" <img alt='' src='https://www.paypal.com/de_DE/i/scr/pixel.gif' width='1' height='1'>\n");
93: echo ("</form>\n");
94: }
95:
96: function ($history = 0) {
97: echo ("<div id='popup' style='position: fixed; display:none; z-index:13;'>\n");
98: echo (" <div class='dragme'>\n");
99: echo (" <div id='popup-icon' style='position: absolute; top: 0; left: 0; width: 30px; height: 25px;'><img height='25' width='30' src='img/popup-icon.gif' alt='Popup icon'></div>\n");
100: echo (" <div id='popup-title' style='position: absolute; top: 0; left: 30px; height: 25px; background: url(./img/popup-title-bg.gif) repeat-x; text-align: center;'><img height='25' width='140' src='img/popup-title.gif' alt='Popup title'></div>\n");
101: echo (" </div>\n");
102: echo (" <div id='popup-close' style='position: absolute; top: 0; width: 30px; height: 25px;'><a style='padding: 0;' href='javascript:popupClose();'><img height='25' width='30' src='img/popup-close.gif' alt='Popup close'></a></div>\n");
103: echo (" <div id='popup-lu' style='position: absolute; left: 0; width: 5px; height: 6px; background-color: transparent;'><img height='6' width='5' src='img/popup-lu.gif' alt='Popup frame'></div>\n");
104: echo (" <div id='popup-u' class='popup-background' style='position: absolute; left: 5px; height: 6px; background-image: url(./img/popup-u.gif); background-repeat: repeat-x;'></div>\n");
105: echo (" <div class='resize' id='popup-ru' style='position: absolute; width: 16px; height: 16px; background-color:transparent; z-index:12;'><img height='16' width='16' src='img/popup-resize.gif' alt='Popup resize'></div>\n");
106: echo (" <div id='popup-l' style='position: absolute; top: 25px; left: 0; width: 2px; background: url(./img/popup-l.gif) repeat-y;'></div>\n");
107: echo (" <div id='popup-r' style='position: absolute; top: 25px; width: 2px; background: url(./img/popup-r.gif) repeat-y;'></div>\n");
108: echo (" <div id='popup-m' class='popup-background' style='position: absolute; top: 25px; left: 2px; overflow:auto;'>\n");
109: if ($history != 0) {
110: echo (" <div style='float: right; margin: 25px'>\n");
111: echo (" <a id='history_back' style='padding: 7px;'><img id='arrow_left' height='24' width='38' src='img/arrow_left_inactive.gif' alt='History back'></a><a id='history_forward' style='padding: 7px;'><img id='arrow_right' height='24' width='38' src='img/arrow_right_inactive.gif' alt='History forward'></a>\n");
112: echo (" </div>\n");
113: }
114: echo (" <div id='popup-body'>\n");
115: }
116:
117: function () {
118: echo (" </div>\n");
119: echo (" </div>\n");
120: echo ("</div>\n");
121: }
122:
123: 124: 125:
126: function ($history = 0) {
127: begin_popup($history);
128: end_popup();
129: }
130: