Ejemplo n.º 1
0
    $cpn = '';
}
echo '<br style="clear:both;"/>';
if ($total_comments && (test('Mda') || test('Mds'))) {
    if (getoption('reverse_comments')) {
        $comments = array_reverse($comments);
    }
    $comment_url = getoption('rw_engine') ? $_SERVER['REQUEST_URI'] : PHP_SELF;
    // Action with comments box
    echo '<form id="comments_frm" name="comment_frm" action="' . $comment_url . '" method="POST">';
    echo '<input type="hidden" name="id" value="' . $id . '" />';
    echo '<input type="hidden" name="subaction" value="addcomment" />';
    echo '<input type="hidden" name="action" value="comment_process" />';
    echo '<input type="hidden" name="popup" value="' . cn_htmlspecialchars(REQ('popup')) . '" />';
    echo '<input type="hidden" name="referer" value="' . cn_htmlspecialchars($_SERVER['REQUEST_URI']) . '" />';
    cn_snippet_digital_signature();
}
// show comments
echo join('', $com);
echo $cpn;
if ($total_comments && (test('Mda') || test('Mds'))) {
    // Some operations, e.g. remove comments
    if (test('Mda') || test('Mds')) {
        echo '<div id="del_btn" class="cn_comment_submit" style="visibility:hidden;"><input type="submit" id="btn_delete" value="Delete comments"/></div>';
    }
    echo '</form>';
    echo '<script type="text/javascript">function d(){var a=document.getElementById("del_btn"); var ck=document.getElementsByName("comm_delete[]"); var i=0; var en="visibility:hidden;"; var dl=document.getElementById("btn_delete"); var cheked=0; ' . 'for(i=0;i<ck.length;i++){ if(ck[i].checked){ cheked++; en="visibility:visible;"; }} a.setAttribute("style", en); ' . 'var btn_name="Delete comment"; if(cheked>1){btn_name=btn_name+"s";} dl.setAttribute("value",btn_name);}';
    echo 'var ss=document.getElementsByName("comm_delete[]"); var i=0; for (i=0; i<ss.length; i++){ ss[i].onclick=d; }</script>';
}
// ---------------------------------------------------------------------------------------------------------------------
/* Available placeholders:
Ejemplo n.º 2
0
    ?>
            <tr>
                <td><?php 
    echo $ip;
    ?>
</td>
                <td align="center"><?php 
    echo $item[0];
    ?>
</td>
                <!-- <td align="center"><?php 
    echo $item[1];
    ?>
</td> -->
                <td align="center">[<a href="<?php 
    echo cn_url_modify('unblock=' . $ip, cn_snippet_digital_signature('a'));
    ?>
" onclick="return(confirm('Confirm unblock'));">unblock</a>]</td>
            </tr>
        <?php 
}
?>
    </table>

    <table width="100%" class="std-table panel">
        <tr>
            <td align="right" height="25">IP Address:&nbsp;</td>
            <td height="25"> <input type="text" name="add_ip"> <input type="submit" value="Block IP / Name"> example: <i>129.32.31.44</i> or <i>129.32.*.*</i>, or <i>username</i> </td>
        </tr>
    </table>
Ejemplo n.º 3
0
    <table class="std-table" width="100%">

        <?php 
cn_snippet_show_list_head('Name|Size (kb)|Date archived');
?>

        <?php 
foreach ($archives as $archive) {
    ?>
        <tr>
            <td><?php 
    echo $archive['name'];
    ?>
 [<a href="<?php 
    echo cn_url_modify('unpack=' . $archive['name'], cn_snippet_digital_signature('a'));
    ?>
" onclick="return(confirm('Unpack this archive? It replace all news'));">unpack</a>]</td>
            <td align="center"><?php 
    echo round($archive['size'] / 1024, 2);
    ?>
</td>
            <td align="center"><?php 
    echo $archive['date'];
    ?>
</td>
        </tr>
        <?php 
}
?>
Ejemplo n.º 4
0
    ?>
            </div>
        <?php 
}
?>

    </div>

    <div class="section">

        <div style="float: right">            
            <?php 
if ($EDITMODE && test('Nud') && $archive_id == 0) {
    ?>
                <input type="button" onClick="if (confirm('Please confirm')) { window.location = '<?php 
    echo cn_url_modify('action=delete', cn_snippet_digital_signature('a'));
    ?>
'; return true; } else return false;" value="Delete">
            <?php 
}
?>
            <?php 
if (empty($_POST['full_story'])) {
    ?>
<input type=button onClick="ShowOrHide('full-story','');" value="Toggle Full-Story"><?php 
}
?>
            <input type=submit name="do_editsave" style='font-weight: bold' title="Post the New Article" value="     <?php 
if (!$EDITMODE) {
    echo 'Add News';
} else {