示例#1
0
        echo '<pre><strong>' . $dirup . '</strong><br />';
        echo _MP_LENGTH . ':<b> ' . MPPrettySize($taille) . '</b><br />';
        echo "</td></tr></table><br />";
        echo "<br /><table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr class=\"odd\"><td>";
        echo '<pre>Table: <strong>' . $row['Name'] . '</strong><br />';
        echo _MP_LENGTH . ':<b> ' . MPPrettySize($row['Data_length']) . '</b><br />';
        echo _MP_DATE_FREE . ':<b> ' . MPPrettySize($row['Data_free']) . '&nbsp;<a href="index.php?op=optimise">' . $optimise . '</a></b><br />';
        echo _MP_TOTAL . ':<b> ' . MPPrettySize($row['Data_length'] + $row['Index_length']) . '</b><br />';
        echo "</td></tr></table><br />";
        echo "<br /><table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr class=\"odd\"><td>";
        echo '<pre>Table: <strong>' . $myrow['Name'] . '</strong><br />';
        echo _MP_LENGTH . ':<b> ' . MPPrettySize($myrow['Data_length']) . '</b><br />';
        echo _MP_DATE_FREE . ':<b> ' . MPPrettySize($myrow['Data_free']) . '&nbsp;<a href="index.php?op=optimisesauv">' . $optimise . '</a></b><br />';
        echo _MP_TOTAL . ':<b> ' . MPPrettySize($myrow['Data_length'] + $myrow['Index_length']) . '</b><br />';
        echo "</td></tr></table></div><br />";
        //Alert stokage
        mp_collapsableBar('bottomtable', 'bottomtableicon');
        echo "<img onclick='toggle('bottomtable'); toggleIcon('bottomtableicon');' id='bottomtableicon' name='bottomtableicon' src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/close12.gif alt='' /></a>&nbsp;" . _MP_STOCK . "</h4>";
        echo "<div id='bottomtable'>";
        $mp_alert = $row['Data_length'] + $row['Index_length'] + $myrow['Data_length'] + $myrow['Index_length'];
        if ($mp_alert > $xoopsModuleConfig['maxalert']) {
            echo "<br /><table width='100%' border='0' cellspacing='1' class='outer'><tr class=\"odd\"><td>" . _MP_ALERT . ":<b>" . MPPrettySize($mp_alert) . "</b> sur <b>" . MPPrettySize($xoopsModuleConfig['maxalert']) . "</b><br /></td></tr></table>";
        } else {
            echo "<br /><table width='100%' border='0' cellspacing='1' class='outer'><tr class=\"odd\"><td>";
            $precis = number_format($mp_alert * 100 / $xoopsModuleConfig['maxalert'], 0, ",", " ");
            printf(_MP_POURCENT, $precis . '%');
            echo "<span style='border: 1px solid rgb(0, 0, 0); background: rgb(255, 255, 255) none repeat scroll 0%; margin-top: 2px; text-align:left; margin-right: 4px; margin-left: 4px; display: block; height: 15px; width: 90%; float: left;  overflow: hidden;'>\r\n      <span style='background:  " . $xoopsModuleConfig['cssbtext'] . " none repeat scroll 0%; display: block; height: 15px; font-size: 5px; width: " . $precis . "%;'></span></span></td></tr></table></div>";
        }
        break;
}
xoops_cp_footer();
示例#2
0
    $i += $debut;
    #
    while ($Fichier = readdir($dossier)) {
        $ext = strtolower(substr($Fichier, strrpos($Fichier, '.') + 1));
        if ($ext == "swf") {
            $files[] = $Fichier;
        }
    }
    sort($files);
    $numrow = count($files);
    echo '
 <th class="head" align="center"><b>' . _MP_OEIL . '</b></th>
 <tr>';
    while ($files[$i] && $i < 5 + $debut) {
        if ($files[$i] != ".." && $files[$i] != "." && $files[$i] != "" && ereg("(.swf)\$", $files[$i])) {
            $poid = MPPrettySize(filesize($rep . "/" . $files[$i]));
            $taille = getimagesize($rep . "/" . $files[$i]);
            $name = str_replace('.', '', $files[$i]);
            echo ' <table class="outer" style="background:#fff;" width="100%" border="0">
  <tr> 
    <td width="60%" rowspan="4">
<div id="z' . $name . '">
<embed src="' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/swf/' . $files[$i] . '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="340" height="180" id="f' . $name . '"></embed><NOEMBED>' . _MP_NOOEIL . '</NOEMBED></div>
</td>
    <td class="head">' . _MP_NAMEO . '&nbsp; ' . $files[$i] . '</td>
  </tr>
  <tr> 
    <td class="odd">' . _MP_TAILLEO . '&nbsp;' . $taille[0] . '*' . $taille[1] . '</td>
  </tr>
  <tr> 
    <td class="head">' . _MP_POIDO . '&nbsp;' . $poid . '</td>
示例#3
0
function mp_post($view_perms, $pm, $mpstop)
{
    global $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsUser, $myts, $xoopsTpl, $sortorder, $order, $start, $mp_alert;
    $xoopsTpl->assign('xoops_pagetitle', $myts->htmlSpecialChars($xoopsModule->name()) . " - " . $myts->htmlSpecialChars($pm->getVar('subject')));
    $poster = new XoopsUser($pm->getVar("from_userid"));
    if (!$poster->isActive()) {
        $poster = array('name' => $myts->HtmlSpecialChars($xoopsConfig['anonymous']));
    } else {
        $poster_rank = $poster->rank();
        if ($poster->isOnline()) {
            $msg_uline = '<div class="comUserStatus"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/images/online.png" title="' . _MP_ONLINE . '" style="width: 20px; height: 20px;"/></div>';
        } else {
            $msg_uline = '<div class="comUserStatus"><img src="' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/images/offline.png" title="' . _MP_OFFLINE . '" style="width: 20px; height: 20px;"/></div>';
        }
        if ($poster->getVar("attachsig")) {
            $signature = "<p><br />_________________<br />" . $poster->user_sig() . "</p>";
        } else {
            $signature = false;
        }
        if (is_file(XOOPS_UPLOAD_PATH . "/" . $poster->getVar('user_avatar'))) {
            $avatar = '<img class="comUserImg" src="' . XOOPS_UPLOAD_URL . "/" . $poster->getVar("user_avatar") . '" alt=""/>';
        } else {
            $avatar = '<img class="comUserImg" src="' . XOOPS_UPLOAD_URL . '"/blank.gif" alt=""/>';
        }
        $poster = array('name' => '<a href="' . XOOPS_URL . '/userinfo.php?uid=' . $poster->getVar("uid") . '">' . $poster->getVar("uname") . '</a>', 'title' => $poster_rank['title'], 'img' => '<img class="comUserRankImg" src="' . XOOPS_UPLOAD_URL . "/" . $poster_rank['image'] . '" alt="" />', 'avatar' => $avatar, 'regdate' => formatTimestamp($poster->getVar('user_regdate'), 's'), 'from' => $poster->getVar('user_from'), 'posts' => $poster->getVar('posts'), 'id' => $pm->getVar('msg_id'), 'uline' => $msg_uline, 'sign' => $signature, 'addcont' => "<img onclick='document.prvmsg.action=\"contbox.php?op=envoimp&to_userid[]=" . $poster->getVar("uid") . "\";document.prvmsg.submit()' src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/addcont.png' title=" . _MP_ADDCONT . " style='cursor:pointer; width: 15px; height: 15px;'></a>");
    }
    if ($pm->getVar('file_msg') > 0) {
        $file_msg = "";
        $up_handler =& xoops_gethandler('priv_msgsup');
        $criteria = new CriteriaCompo();
        $criteria->add(new Criteria('u_id', $pm->getVar('file_msg')));
        $pm_up =& $up_handler->getObjects($criteria);
        foreach (array_keys($pm_up) as $i) {
            $file_msg .= "<br /><br /><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/upload.png' alt='' />&nbsp;" . _MP_MIMEFILE . "<a href='visit.php?fileup=" . $pm_up[$i]->getVar('u_file') . "'>" . $pm_up[$i]->getVar('u_name') . "</a> (" . $pm_up[$i]->getVar('u_mimetype') . " | " . MPPrettySize($pm_up[$i]->getVar('u_weight')) . ")";
        }
    } else {
        $file_msg = false;
    }
    if (!$pm->getVar('msg_image')) {
        $msg_img = "<img src='" . XOOPS_URL . "/images/read.gif' alt='' />";
    } else {
        $msg_img = "<img src='" . XOOPS_URL . "/images/subject/" . $pm->getVar('msg_image') . "' alt='' />";
    }
    if ($pm->getVar('anim_msg')) {
        $anim = '<div id="anim' . $pm->getVar('msg_id') . '" name="anim" style="width: 640px; position: absolute; height: 130px; left: 50%; 
 margin-left: -375px; text-align: center; visibility: hidden;"> 
 <embed src="' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/swf/' . $pm->getVar('anim_msg') . '" wmode="transparent" id="flash' . $pm->getVar('msg_id') . '" name="flash" loop="false"  autostart="0" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="640" height="380"></embed>
 <NOEMBED>' . _MP_NOOEIL . '</NOEMBED></div><a href="#' . $pm->getVar('msg_id') . '" onclick="document.getElementById(\'anim' . $pm->getVar('msg_id') . '\').style.visibility=\'visible\';flash' . $pm->getVar('msg_id') . '.TPlay(\'_level0\');" >' . _MP_OEIL . '</a> / <a href="#' . $pm->getVar('msg_id') . '" onclick="document.getElementById(\'anim' . $pm->getVar('msg_id') . '\').style.visibility=\'hidden\';flash' . $pm->getVar('msg_id') . '.TStopPlay(\'_level0\');" >' . _MP_OEILOFF . '</a>';
    } else {
        $anim = false;
    }
    //boutton message
    if ($view_perms & GPERM_MESS) {
        if (empty($mpstop)) {
            if ($pm->getVar('cat_msg') == 2) {
                $view_actions[] = "<input type='submit'  class='xo-message-form' name='quote_messages'  value='" . _MP_QUOTE . "' onclick='javascript: document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"msgbox.php?op=sendbox&reply=1&quotedac=1\";' id='stop' disabled>";
                $view_actions[] = "<input type='submit'  class='xo-message-form'  name='reply'  value='" . _MP_MREPLY . "' onclick='javascript: document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"msgbox.php?op=sendbox&reply=1\";' id='stop' disabled>";
            } else {
                $view_actions[] = "<input type='submit' class='xo-message-form'  name='quote_messages'  value='" . _MP_QUOTE . "' onclick='javascript: document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"msgbox.php?op=sendbox&reply=1&quotedac=1\";' >";
                $view_actions[] = "<input type='submit'  class='xo-message-form'  value='" . _MP_MREPLY . "' onclick='javascript: document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"msgbox.php?op=sendbox&reply=1\";' >";
            }
        } else {
            $view_actions[] = "<input type='submit'  class='xo-message-form'  name='quote_messages'  value='" . _MP_QUOTE . "' onclick='javascript: document.getElementById(\"msg_mp\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"msgbox.php?op=sendbox&reply=1&quotedac=1\";' id='stop' disabled>";
            $view_actions[] = "<input type='submit' class='xo-message-form'  value='" . _MP_MREPLY . "' onclick='javascript: document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"msgbox.php?op=sendbox&reply=1\";' id='stop' disabled>";
        }
    }
    $view_actions[] = "<input type='submit'  class='xo-message-form'  id='del' value='" . _MP_MDEL . "' onclick='document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"delbox.php?option=delete_messages\"'>";
    $view_actions[] = "<input type='submit' class='xo-message-form'  onclick='document.prvmsg.action=\"delbox.php?option=read_messages&read=0\"' id='nlu' value='" . _MP_MNLU . "'>";
    $view_actions[] = "<input type='submit' class='xo-message-form'  onclick='document.prvmsg.action=\"delbox.php?option=move_messages\"' id='move'  value='" . _MP_MMOVE . "'>";
    //$xoopsTpl->assign('view_actions', $view_actions);
    if ($view_perms & GPERM_EXP) {
        $exporte = "<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/smallprint.png' style=\" cursor:pointer; border-width: 0px; width: 16px; height: 20px;\" onclick='document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"print.php?option=print_messages\";document.prvmsg.submit()'>&nbsp;<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/smallpdf.png' style=\"cursor:pointer; border-width: 0px; width: 16px; height: 20px;\" onclick='document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"makepdf.php?option=pdf_messages\";document.prvmsg.submit()'>&nbsp;<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/smallemail.png' title='" . _MP_DESCEMAIL . "' style=\" cursor:pointer; border-width: 0px; width: 16px; height: 20px;\" onclick='document.getElementById(\"msg_mp[]\").value=\"" . $pm->getVar('msg_id') . "\";document.prvmsg.action=\"email.php?option=email_messages\";document.prvmsg.submit()'>";
    } else {
        $exporte = false;
    }
    $mp_subject = $pm->getVar('subject') ? $myts->displayTarea($pm->getVar('subject')) : _MP_NONESUBJ;
    $xoopsTpl->append('prive', array('msg_time' => '<a id="' . $pm->getVar('msg_id') . '"></a>' . formatTimestamp($pm->getVar('msg_time')), 'msg_subject' => $mp_subject, 'msg_text' => $myts->displayTarea($myts->undoHtmlSpecialChars($pm->getVar('msg_text')), $xoopsModuleConfig['html']), 'file_msg' => $file_msg, 'msg_img' => $msg_img, 'poster' => $poster, 'anim' => $anim, 'export' => $exporte, 'view_actions' => $view_actions));
    unset($thread_buttons);
    unset($eachposter);
}