36 echo
"<script type=\"text/javascript\"><!--//
37 function doSmilie(addSmilie) {
38 var textareaDom = window.opener.xoopsGetElementById(\"" .
$target .
"\");
39 xoopsInsertText(textareaDom, addSmilie);
47 <table width="100%" class="outer">
50 $myts =& MyTextsanitizer::getInstance();
51 if ($smiles =
$myts->getSmileys()) {
53 foreach ($smiles as $key => $smile) {
54 echo
"<tr class='$rcolor'><td>" . $smile[
'code'] .
"</td><td>" . $smile[
'emotion'] .
"</td><td><img onmouseover='style.cursor=\"hand\"' onclick='doSmilie(\" " . $smile[
'code'] .
" \");' src='" .
XOOPS_UPLOAD_URL .
"/" . $smile[
'smile_url'] .
"' alt='' /></td></tr>";
55 $rcolor = ($rcolor ==
'even') ?
'odd' :
'even';
58 echo
"Could not retrieve data from the database.";
65 <script language=
'javascript'>
67 function myimage_onclick(counter){
68 window.opener.xoopsGetElementById(
"user_avatar").options[counter].selected =
true;
70 window.opener.xoopsGetElementById(
"user_avatar").focus();
73 function showAvatar() {
74 window.opener.xoopsGetElementById(
"avatar").src=
'<?php
75 echo XOOPS_UPLOAD_URL;
76 ?>/' + window.opener.xoopsGetElementById(
"user_avatar").options[window.opener.xoopsGetElementById(
"user_avatar").selectedIndex].value;
90 $avatarslist = $avatar_handler->getList(
'S');
92 $counter = isset(
$_GET[
'start']) ? intval(
$_GET[
'start']) : 0;
93 foreach ($avatarslist as
$file => $name) {
94 echo
'<td><img src="uploads/' .
$file .
'" alt="' . $name .
'" style="padding:10px; vertical-align:top;" /><br />' . $name .
'<br /><input name="myimage" type="button" value="' .
_SELECT .
'" onclick="myimage_onclick(' . $counter .
')" /></td>';
102 echo
'</tr></table></form></div>';
105 if (!
$GLOBALS[
'xoopsSecurity']->check() || ! isset(
$_POST[
'op']) ||
$_POST[
'op'] ==
"sendform") {
118 echo
'</head><body>';
119 echo
"<div class='errorMsg'>" . implode(
'<br />',
$GLOBALS[
'xoopsSecurity']->getErrors()) .
"</div>";
121 <form action="' . XOOPS_URL .
'/misc.php" method="post" onsubmit="return checkForm();"><table width="100%" class="outer" cellspacing="1"><tr><th colspan="2">' .
_MSC_RECOMMENDSITE .
'</th></tr>';
122 echo
"<tr><td class='head'>
123 <input type='hidden' name='op' value='sendsite' />
124 <input type='hidden' name='action' value='showpopups' />
125 <input type='hidden' name='type' value='friend' />\n";
126 echo
_MSC_YOURNAMEC .
"</td><td class='even'><input type='text' name='yname' value='{$yname}' id='yname' /></td></tr>
127 <tr><td class='head'>" .
_MSC_YOUREMAILC .
"</td><td class='odd'><input type='text' name='ymail' value='{$ymail}' id='ymail' /></td></tr>
128 <tr><td class='head'>" .
_MSC_FRIENDNAMEC .
"</td><td class='even'><input type='text' name='fname' value='{$fname}' id='fname' /></td></tr>
129 <tr><td class='head'>" .
_MSC_FRIENDEMAILC .
"</td><td class='odd'><input type='text' name='fmail' value='{$fmail}' id='fmail' /></td></tr>
130 <tr><td class='head'> </td><td class='even'><input type='submit' value='" .
_SEND .
"' /> <input value='" .
_CLOSE .
"' type='button' onclick='javascript:window.close();' />" .
$GLOBALS[
'xoopsSecurity']->getTokenHTML() .
"</td></tr>
133 }
else if (
$_POST[
'op'] ==
"sendsite") {
134 $myts =& MyTextsanitizer::getInstance();
138 $ymail = isset(
$_POST[
'ymail']) ?
$myts->stripSlashesGPC(trim(
$_POST[
'ymail'])) :
'';
140 if (!isset(
$_POST[
'yname']) || trim(
$_POST[
'yname']) ==
"" || $ymail ==
'' || !isset(
$_POST[
'fname']) || trim(
$_POST[
'fname']) ==
"" || !isset(
$_POST[
'fmail']) || trim(
$_POST[
'fmail']) ==
'') {
144 $yname =
$myts->stripSlashesGPC(trim(
$_POST[
'yname']));
145 $fname =
$myts->stripSlashesGPC(trim(
$_POST[
'fname']));
146 $fmail =
$myts->stripSlashesGPC(trim(
$_POST[
'fmail']));
149 redirect_header(XOOPS_URL .
"/misc.php?action=showpopups&type=friend&op=sendform", 2, $errormessage);
153 $xoopsMailer->setTemplate(
"tellfriend.tpl");
154 $xoopsMailer->assign(
"SITENAME",
$xoopsConfig[
'sitename']);
155 $xoopsMailer->assign(
"ADMINMAIL",
$xoopsConfig[
'adminmail']);
156 $xoopsMailer->assign(
"SITEURL", XOOPS_URL .
"/");
157 $xoopsMailer->assign(
"YOUR_NAME", $yname);
158 $xoopsMailer->assign(
"FRIEND_NAME", $fname);
159 $xoopsMailer->setToEmails($fmail);
160 $xoopsMailer->setFromEmail($ymail);
161 $xoopsMailer->setFromName($yname);
164 if (!$xoopsMailer->send()) {
165 echo $xoopsMailer->getErrors();
174 echo
'</head><body>';
175 echo
'<table style="width:100%;" cellspacing="1" class="outer"><tr><th colspan="3">' .
_WHOSONLINE .
'</th></tr>';
178 $online_total = $online_handler->getCount();
179 $limit = ($online_total > 20) ? 20 : $online_total;
183 $onlines = $online_handler->getAll(
$criteria);
184 $count = count($onlines);
187 for (
$i = 0;
$i < $count;
$i++) {
188 if ($onlines[
$i][
'online_uid'] == 0) {
189 $onlineUsers[
$i][
'user'] =
'';
191 $onlineUsers[
$i][
'user'] =
new XoopsUser($onlines[
$i][
'online_uid']);
193 $onlineUsers[
$i][
'ip'] = $onlines[
$i][
'online_ip'];
194 $onlineUsers[
$i][
'updated'] = $onlines[
$i][
'online_updated'];
195 $onlineUsers[
$i][
'module'] = ($onlines[
$i][
'online_module'] > 0) ? $modules[$onlines[
$i][
'online_module']] :
'';
198 for (
$i = 0;
$i < $count;
$i++) {
199 $class = ($class ==
'odd') ?
'even' :
'odd';
200 echo
'<tr style="vertical-align:middle; text-align: center;" class="' . $class .
'">';
201 if (is_object($onlineUsers[
$i][
'user'])) {
202 $avatar = $onlineUsers[
$i][
'user']->getVar(
'user_avatar') ?
'<img src="' .
XOOPS_UPLOAD_URL .
'/' . $onlineUsers[
$i][
'user']->getVar(
'user_avatar') .
'" alt="" />' :
' ';
203 echo
'<td>' .
$avatar .
"</td><td><a href=\"javascript:window.opener.location='" . XOOPS_URL .
"/userinfo.php?uid=" . $onlineUsers[
$i][
'user']->getVar(
'uid') .
"';window.close();\">" . $onlineUsers[
$i][
'user']->getVar(
'uname') .
"</a>";
208 echo
'<br />(' . $onlineUsers[
$i][
'ip'] .
')';
210 echo
'</td><td>' . $onlineUsers[
$i][
'module'] .
'</td></tr>';
212 echo
'</table><br />';
213 if ($online_total > 20) {
214 include_once
$GLOBALS[
'xoops']->path(
'class/pagenav.php');
216 echo
'<div style="text-align: right;">' .
$nav->renderNav() .
'</div>';
221 include_once
$GLOBALS[
'xoops']->path(
'language/' . $xoopsConfig[
'language'] .
'/user.php');
223 echo
'<div style="text-align:center;"><input class="formButton" value="' .
_CLOSE .
'" type="button" onclick="window.opener.location.reload();window.close();" /></div>';
224 $closebutton =
false;
231 echo
'<div style="text-align:center;"><input class="formButton" value="' .
_CLOSE .
'" type="button" onclick="javascript:window.close();" /></div>';
239 <script language=
'javascript' type=
"text/javascript">
243 if ( xoopsGetElementById(
"yname").value ==
"" ){
245 echo _MSC_ENTERYNAME;
247 xoopsGetElementById(
"yname").focus();
249 }
else if ( xoopsGetElementById(
"fname").value ==
"" ){
251 echo _MSC_ENTERFNAME;
253 xoopsGetElementById(
"fname").focus();
255 }
else if ( xoopsGetElementById(
"fmail").value ==
""){
257 echo _MSC_ENTERFMAIL;
259 xoopsGetElementById(
"fmail").focus();