Пример #1
0
    function elencoNewsHome($lan)
    {
        $news = mysql_query("select * from news where pubblicata=1 order by data_news desc limit 0,5");
        if (mysql_num_rows($news) == 0) {
            echo '<p>Non sono presenti news in questo momento</p>';
        } else {
            while ($n = mysql_fetch_assoc($news)) {
                $url = $this->costruisciPath('news', $n, $lan);
                ?>
	    		<h3><a href="<?php 
                echo $url;
                ?>
" title="<?php 
                echo stripslashes($n['titolo_news_' . $lan]);
                ?>
"><?php 
                echo stripslashes($n['titolo_news_' . $lan]);
                ?>
</a></h3>
                <p class="date"><?php 
                echo norm_date($n['data_news']);
                ?>
</p>
                <p><?php 
                echo trunc_text(strip_tags(stripslashes($n['descrizione_news_' . $lan])), 7, $url);
                ?>
</p>
                <hr />
	    		<?php 
            }
        }
    }
Пример #2
0
 public static function format_value($data, $type)
 {
     switch ($type) {
         case type::STRING:
             return $data;
         case type::TEXT:
             return $data;
         case type::DATE:
             return $data;
         case type::HTML:
             return $data;
         case type::DATE_TIME:
             return norm_date($data);
         case type::LINK:
             return make_url_str($data);
         case type::LINK_NEWWIN:
             return make_url_str($data, true);
     }
 }
Пример #3
0
                    OUT($news_list[$i]["name"]);
                    ?>
"><?php 
                    OUT($ud["nick"]);
                    ?>
</a>: "<a style="font-size:9px;" href="?p=news&view=post&id=<?php 
                    OUT($news_list[$i]["id"]);
                    ?>
"><b><?php 
                    OUT($news_list[$i]["head"]);
                    ?>
</b></a>"</div>
                <?php 
                    OUT($news_list[$i]["text"]);
                    ?>
<br>(<a style="font-size:9px;" href="?p=news&view=post&id=<?php 
                    OUT($news_list[$i]["id"]);
                    ?>
">читать целиком</a>)<br>                
                <font color=gray style="font-size:8.5px">/<?php 
                    OUT(norm_date($news_list[$i]["date"]));
                    ?>
</font><br>
                <?php 
                }
            } else {
                include SK_DIR . "/newsbar.php";
            }
        }
    }
}
Пример #4
0
                                    <td align=center width=50% class=tbl1>
                                          <?php 
                                $ud = get_user_data($ans[$answ_idx]["name"]);
                                OUT("<a href=?p=users&act=userinfo&id=" . $ans[$answ_idx]["name"] . ">" . $ud["nick"] . "</a>");
                                if ($ans[$answ_idx]["email"]) {
                                    echo ", " . make_email_str($ans[$answ_idx]["email"]);
                                }
                                ?>
 <?php 
                                if ($ans[$answ_idx]["url"]) {
                                    echo ", " . make_url_str($ans[$answ_idx]["url"]);
                                }
                                ?>
 
                                          <?php 
                                echo ", " . norm_date($ans[$answ_idx]["time"]);
                                ?>
 
                                    </td>
                                    </tr>
                                    <tr>
                                    <td colspan=2 width=100% class=tbl1>
                                          <?php 
                                echo $ans[$answ_idx]["text"];
                                ?>
 
                                    </td>
                                    </tr>
                                  <?php 
                            }
                            ?>
Пример #5
0
                    OUT($list[$i]["title"]);
                    ?>
</a></b></div>
                <?php 
                    OUT(substr($list[$i]["descr"], 0, 100) . "...");
                    ?>
<br>(<a style="font-size:9px;" href="?p=articles&topic=<?php 
                    OUT($list[$i]["tid"]);
                    ?>
&act=view&page=1&art=<?php 
                    OUT($list[$i]["id"]);
                    ?>
">читать целиком</a>)<br>                
                <font color=gray style="font-size:8.5px"><a style="font-size:8.5px;" href="?p=users&act=userinfo&id=<?php 
                    OUT($ud["id"]);
                    ?>
"><?php 
                    OUT($ud["nick"]);
                    ?>
</a> /<?php 
                    OUT(norm_date($list[$i]["date"]));
                    ?>
</font><br>
                <?php 
                }
            } else {
                include SK_DIR . "/articlesbar.php";
            }
        }
    }
}
Пример #6
0
function titoloAggiornamento($id)
{
    $pra = mysql_fetch_assoc(mysql_query("select\n\t\t\t\t\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\t\t\t\t\tcliente,\n\t\t\t\t\t\t\t\t\t\t\tdescrizione\n\t\t\t\t\t\t\t\t\t    from\n\t\t\t\t\t\t\t\t\t    \taggiornamenti\n\t\t\t\t\t\t\t\t\t    where\n\t\t\t\t\t\t\t\t\t    \tid_aggiornamenti=" . $id));
    if ($pra['cliente'] == 1) {
        $inizio = 'Commento cliente del ';
    } else {
        $inizio = 'Aggiornamento del ';
    }
    return $inizio . norm_date($pra['data']);
}
Пример #7
0
function log_url_user_template($data, $onlinedata = null)
{
    global $DIRS;
    ?>
     <table width=100% align=center class=tbl2>
                    <tr><td width=100% colspan=2>
                    <div align=center><b><?php 
    OUT($data["fio"]);
    ?>
</b></div>
                    </td></tr>
                    <tr><td width=30%>
                      <table width=100% align=center><tr><td align=center width=100% align=center>
                      <a href="<?php 
    OUT("?p=users&act=userinfo&id=" . $data["uid"]);
    ?>
">
                      <b><?php 
    OUT($data["nick"]);
    ?>
</b><br>
                      <?php 
    if (file_exists($DIRS["users_avatars"] . "/" . $data["uid"]) && is_file($DIRS["users_avatars"] . "/" . $data["uid"])) {
        OUT("<img border=0 src=\"" . $DIRS["users_avatars"] . "/" . $data["uid"] . "\">");
    }
    ?>
</a>
                      </td></tr><tr><td align=center>
                      <?php 
    OUT($data["rang"]);
    ?>
                      </td></tr>
                      <tr><td align=center height=100% valign=top>
                      <?php 
    OUT(make_raiting_str($data["raiting"]));
    ?>
                      </td></tr>
                      </table>
                    </td><td width=70%>
                      <table  width=100% class=tbl1>
                        <tr><td width=50%>
                        Login:
                        </td><td width=50%><?php 
    OUT($onlinedata["user"]);
    ?>
</td></tr>
                        <tr><td width=50%>
                        VIP:
                        </td><td width=50%><?php 
    OUT($onlinedata["ip"]);
    ?>
</td></tr>
                        <tr><td width=50%>
                        IP:
                        </td><td width=50%><?php 
    OUT($onlinedata["call_from"]);
    ?>
</td></tr>
                        <tr><td width=50%>
                        Траффик:
                        </td><td width=50%><?php 
    OUT(bytes2mb($onlinedata["out_bytes"]) . " Mb (" . bytes2kb($onlinedata["out_bytes"]) . " Kb)");
    ?>
</td></tr>
                        <tr><td width=50%>
                        Время:
                        </td><td width=50%><?php 
    OUT(gethours($onlinedata["time_on"]) . ":" . getmins($onlinedata["time_on"]) . ":" . getsecs($onlinedata["time_on"]));
    ?>
</td></tr>
                        <tr><td width=50%>
                        Начало сессии:
                        </td><td width=50%><?php 
    OUT(norm_date(strtotime($onlinedata["start_time"])));
    ?>
</td></tr>
                        <tr><td width=50%>
                        Последнее изменение:
                        </td><td width=50%><?php 
    OUT(norm_date($onlinedata["last_change"]));
    ?>
</td></tr>
                        <?php 
    if ($onlinedata["terminate_cause"] != "Online") {
        ?>
                        <tr><td width=50%>
                        Конец сессии:
                        </td><td width=50%><?php 
        OUT(norm_date(strtotime($onlinedata["stop_time"])));
        ?>
</td></tr>
						<?php 
    }
    ?>
                      </table>
                    </td>
                  </table>
    <?php 
}
Пример #8
0
                for ($i = count($alist) - 1; $i >= 0 && $i >= count($alist) - 3; --$i) {
                    $data = $ANN->GetAnnData($alist[$i]);
                    ?>
                <a style="font-size:9px" href="?p=users&act=userinfo&id=<?php 
                    $ud = get_user_data($data['login']);
                    OUT($ud["id"]);
                    ?>
"><?php 
                    OUT($ud["nick"]);
                    ?>
</a>:<?php 
                    OUT($data['title']);
                    ?>
<br>                
                <font color=gray style="font-size:8.5px">/<?php 
                    OUT(norm_date($data['date']));
                    ?>
</font><br>
                <?php 
                }
                ?>
                <b><div align=center><a style="font-size:8.5px" href=?p=annoucements>подробнее</a></div>    
              <?php 
            } else {
                include SK_DIR . "/annoucementsbar.php";
            }
        }
    }
}
?>
Пример #9
0
                        <tr><td width=50%>                    
                        Время:
                        </td><td width=50%><?php 
        OUT(gethours($list[$i]["time_on"]) . ":" . getmins($list[$i]["time_on"]) . ":" . getsecs($list[$i]["time_on"]));
        ?>
</td></tr>                        
                        <tr><td width=50%>                    
                        Начало сессии:
                        </td><td width=50%><?php 
        OUT(norm_date(strtotime($list[$i]["start_time"])));
        ?>
</td></tr>
                        <tr><td width=50%>
                        Последнее изменение:
                        </td><td width=50%><?php 
        OUT(norm_date($list[$i]["last_change"]));
        ?>
</td></tr>

                      </table>
                    </td>
                  </table>                
                  <table width=50% height=100%><tr>
                  <td align=center class=tbl1 width=30%>
                    <a href="<?php 
        OUT("?p={$p}&act={$act}&action=message&klip=" . $list[$i]["call_from"] . "&klport=" . $list[$i]["port"]);
        ?>
">написать сообщение</a></td>                   
                  <td align=center class=tbl1 width=30%>
                    <?php 
        $ud = get_user_data($data["uid"]);
Пример #10
0
          <td width=50% class="td_tnd_link"><?php 
                                OUT($data["login"]);
                                ?>
</td>
         </tr>
         <tr>
          <td width=50% class="td_tnd_link">ФИО:</td>
          <td width=50% class="td_tnd_link"><?php 
                                OUT($data["fio"]);
                                ?>
</td>
         </tr>
         <tr>
          <td width=50% class="td_tnd_link">Дата регистрации:</td>
          <td width=50% class="td_tnd_link"><?php 
                                OUT(norm_date($data["regdate"]));
                                ?>
</td>
         </tr>
         <tr>
          <td width=50% class="td_tnd_link">Ранг:</td>
          <td width=50% class="td_tnd_link"><?php 
                                OUT($data["rang"]);
                                ?>
</td>
         </tr>
         <tr>
          <td width=50% class="td_tnd_link">Группа:</td>
          <td width=50% class="td_tnd_link"><?php 
                                $gdata = $USR->GetGroupData($data["group"]);
                                OUT($gdata["name"]);
Пример #11
0
    function genera_form_modifica($db, $id)
    {
        if (isset($p['controllo'])) {
            $p['label'] .= '*';
        }
        $tab = 0;
        if ($id != 0) {
            $uno = mysql_fetch_assoc(mysql_query("select * from " . $db . " where id_" . $db . "=" . $id));
        } else {
            if ($db == 'home') {
                $db = 'pagine where home=1';
            } elseif ($db == 'pagine') {
                $db = 'pagine where home=0';
            }
            $molti = mysql_query("select * from " . $db);
        }
        if (isset($uno)) {
            foreach ($this->_properties as $p) {
                $cond = '';
                if ($p['controllo'] == 'data') {
                    $uno[$p['nome']] = norm_date($uno[$p['nome']]);
                }
                if ($p['tipo'] == 'tabs') {
                    $tab = 1;
                    print '<div id="tabs">
							<ul>' . "\n";
                    foreach ($p['voci'] as $k => $v) {
                        print '<li><a href="#' . $k . '">' . $v . '</a></li>' . "\n";
                    }
                    print '</ul><div class="clear"></div>' . "\n";
                } elseif ($p['tipo'] == 'tab') {
                    if (!isset($p['primo'])) {
                        print "\n" . '</div>' . "\n";
                    }
                    print '<div id="' . $p['nome'] . '">' . "\n";
                } elseif ($p['tipo'] == 'titolo') {
                    $i = 0;
                    print '<h3 class="clear titolo_admin">' . $p['label'] . '</h3>';
                } elseif ($p['tipo'] == 'textarea') {
                    print "<div class=\"riga_form\">\n";
                    print "<div class=\"label_form\"><label for=\"" . $p['nome'] . "\">" . $p['label'] . "</label></div>\n";
                    print "<div class=\"campo_inserimento\"><textarea id=\"" . $p['nome'] . "\" name=\"" . $p['nome'] . "\" cols=\"28\" rows=\"5\">" . stripslashes($uno[$p['nome']]) . "</textarea></div>\n";
                    print "</div>\n";
                } elseif ($p['tipo'] == 'password') {
                    print "<div class=\"riga_form\">\n";
                    print "<div class=\"label_form\"><label for=\"" . $p['nome'] . "\">" . $p['label'] . " </label></div>\n";
                    print "<div class=\"campo_inserimento\">&nbsp; <input type=\"" . $p['tipo'] . "\" id=\"" . $p['nome'] . "\" name=\"" . $p['nome'] . "\" size=\"28\" value=\"" . stripslashes($uno[$p['nome']]) . "\"  /></div>\n";
                    print "</div>\n";
                    print "<div class=\"riga_form\">\n";
                    print "<div class=\"label_form\"><label for=\"c" . $p['nome'] . "\">Conferma " . $p['label'] . " </label></div>\n";
                    print "<div class=\"campo_inserimento\">&nbsp; <input type=\"" . $p['tipo'] . "\" id=\"c" . $p['nome'] . "\" name=\"c" . $p['nome'] . "\" size=\"28\" value=\"" . stripslashes($uno[$p['nome']]) . "\" /></div>\n";
                    print "</div>\n";
                } elseif ($p['tipo'] == 'select') {
                    print "<div class=\"riga_form\">\n";
                    print "<div class=\"label_form\"><label for=\"" . $p['nome'] . "\">" . $p['label'] . "</label></div>\n";
                    print "<div class=\"campo_inserimento\"><select id=\"" . $p['nome'] . "\" name=\"" . $p['nome'] . "\">\n";
                    if (isset($p['facoltativo'])) {
                        print "<option value=\"\">-- Scegli --</option>";
                    }
                    if (isset($p['modif']) && $p['modif'] == 'no') {
                        print "<option value=''>- Mesi -</option>";
                    }
                    if (isset($p['voci'])) {
                        $sel = '';
                        foreach ($p['voci'] as $v) {
                            if (substr_count($v, '*') >= 1) {
                                $v = trim($v, '*');
                            }
                            if (strtoupper($uno[$p['nome']]) == strtoupper($v)) {
                                $sel = 'selected';
                            }
                            print "<option value=\"" . $v . "\" " . $sel . ">" . $v . "</option>\n";
                            $sel = '';
                        }
                        print "</select></div></div>\n";
                    } elseif (isset($p['db'])) {
                        if (isset($p['dipendenza']) && $p['dipendenza']['db'] == $p['db']) {
                            subOpt($p['nome'], $p['dipendenza']['cosa'], $p['db'], $p['campi'][1], $uno[$p['nome']]);
                        } else {
                            if (isset($p['condizione'])) {
                                $cond = " where " . $p['condizione'];
                            }
                            print "select * from " . $p['db'] . $cond;
                            $query = mysql_query("select * from " . $p['db'] . $cond) or die(mysql_error());
                            while ($ris = mysql_fetch_assoc($query)) {
                                $sel = '';
                                $opzioni = '';
                                foreach ($p['campi'] as $c) {
                                    $opzioni .= ' ' . $ris[$c];
                                    if (strtoupper($uno[$p['nome']]) == strtoupper($ris['id_' . $p['db']])) {
                                        $sel = 'selected';
                                    }
                                }
                                print "<option value=\"" . $ris['id_' . $p['db']] . "\" " . $sel . ">" . $opzioni . "</option>\n";
                                $sel = '';
                            }
                        }
                        print "</select></div></div>\n";
                    }
                } elseif ($p['tipo'] == 'file') {
                    print "<div class=\"riga_form\">\n";
                    $img = '';
                    if (is_file('../images/thbn/' . $uno[$p['nome']])) {
                        $img = "<img src=\"../images/thbn/" . $uno[$p['nome']] . "?num=" . rand() . "\"/><br />\n";
                        print '<div class="immagine">';
                        print $img . "<br />\n";
                        print "<input type=\"button\" name=\"cancella_foto\" value=\"Cancella\" onclick=\"cancellaFoto('" . $p['nome'] . "','" . $id . "','" . $_GET['cosa'] . "');\" />";
                        print '</div>';
                    }
                    print "<div class=\"label_img\"><label for=\"" . $p['nome'] . "\">" . $p['label'] . "</label></div>\n";
                    print "<div class=\"mod_img\"><input type=\"" . $p['tipo'] . "\" name=\"" . $p['nome'] . "\" size=\"30\" /></div>\n";
                    print "</div>\n";
                } else {
                    print "<div class=\"riga_form\">\n";
                    $ch = '';
                    if ($p['tipo'] == 'checkbox') {
                        $ch = "value=\"1\"";
                        if ($uno[$p['nome']] == 1) {
                            $ch .= " checked";
                        }
                    } elseif ($p['nome'] != 'googlemap') {
                        $ch = "value=\"" . stripslashes($uno[$p['nome']]) . "\"";
                    } else {
                        $ch = "value=\"" . htmlentities(stripslashes($uno[$p['nome']])) . "\"";
                    }
                    print "<div class=\"label_form\"><label for=\"" . $p['nome'] . "\">" . $p['label'] . "</label></div>\n";
                    print "<div class=\"campo_inserimento\"><input type=\"" . $p['tipo'] . "\" id=\"" . $p['nome'] . "\" name=\"" . $p['nome'] . "\" size=\"28\" " . $ch . " /></div>\n";
                    print "</div>\n";
                }
            }
        } else {
            while ($r = mysql_fetch_assoc($molti)) {
                foreach ($this->_properties as $obj) {
                    if ($obj['nome'] == $r['nome']) {
                        $p = $obj;
                        break;
                    }
                }
                if ($p['tipo'] == 'textarea') {
                    print "<div class=\"riga_form\">\n";
                    print "<div class=\"label_form\"><label for=\"" . $p['nome'] . "\">" . $p['label'] . "</label></div>\n";
                    print "<div class=\"campo_inserimento\"><textarea name=\"" . $p['nome'] . "\" id=\"" . $p['nome'] . "\" cols=\"28\" rows=\"5\">" . $r['testo'] . "</textarea></div>\n";
                    print "</div>\n";
                }
            }
        }
        if ($tab == 1) {
            print '<!--fine ultimo tab e chiusura div tab -->' . "\n";
            print '</div></div>' . "\n";
        }
        print "<div class=\"riga_form\">\n";
        print "<div class=\"label_form\"><input type=\"submit\" value=\"Modifica\" name=\"modifica\" /></div>\n";
        print "</div>\n";
    }
Пример #12
0
$events = $BILL->GetEvents($page, $pagesize, "date");
$evcount = $BILL->GetRowsCount('events');
?>
 <?php 
echo admin_events_pager($page, $evcount, $pagesize);
?>
  <table border = 0 width=100% class=tbl1>
   <tr> <td class=tbl1>Пользователь</td><td class=tbl1>Системное событие</td><td class=tbl1>Время</td></tr>  
 <?php 
foreach ($events as $event) {
    ?>
     <tr>
       <td class=tbl1><?php 
    echo $event['login'];
    ?>
</td>
       <td class=tbl1><?php 
    echo $event['event'];
    ?>
</td>
       <td class=tbl1><?php 
    echo norm_date(strtotime($event['date']));
    ?>
</td>
     </tr>
    <?php 
}
?>
</table>
<?php 
echo admin_events_pager($page, $evcount, $pagesize);
Пример #13
0
         <?php 
                    $denied = $BILL->GetDeniedLog($uid);
                    $i = 0;
                    foreach ($denied as $url) {
                        ?>
			   <tr>
			   	<td class=tbl1><?php 
                        echo $i++;
                        ?>
</td>
			   	<td class=tbl1><?php 
                        echo make_url_str($url['url']);
                        ?>
</td>
			   	<td class=tbl1><?php 
                        echo norm_date($url['date']);
                        ?>
</td>
			   </tr>

			<?php 
                    }
                    ?>
		</table>
		<?php 
                }
                if (!isset($sort)) {
                    $sort = ">count";
                }
                if (!isset($limit) || !$limit) {
                    $limit = 25;