示例#1
0
    if ($screen == 1) {
        $friend_ndx = get_param('friend_ndx');
        $friend_ndx_list = implode('|', $friend_ndx);
    } elseif ($screen == 2) {
        $friend_ndx_list = get_param('friend_ndx_list');
        $message = get_param('message');
        $user->tell_friends($friend_ndx_list, $message);
    }
}
$html = new HTML();
$html->set_title('Tell Friends');
$html->generate_header_mobile();
?>
<ul data-role='listview' data-inset='false' data-theme='a'  data-divider-theme='a'>
    <li><?php 
echo $announcement->heading();
?>
</li>
    <li>Let my friends know</li>
    <li>
        <form method="post">
<?php 
if ($select_friends) {
    ?>
        <input type="hidden" id="screen" name="screen" value="1"/>
<?php 
    if (!empty($friends)) {
        foreach ($friends as $key => $friend) {
            ?>
        <input type="checkbox" id="friend_ndx" name="friend_ndx[]" value="<?php 
            echo $key;
示例#2
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/global.php';
require_once DOC_ROOT . '/includes/classes/class.announcement.php';
require_once DOC_ROOT . '/includes/classes/class.tag.php';
$announcement_id = get_param('id');
if ($announcement_id) {
    $announcement = new Announcement($announcement_id);
} else {
    $announcement = new Announcement();
}
if (!empty($_POST)) {
    // announcement data first
    $announcement->heading(get_param('heading'));
    $announcement->description(get_param('description'));
    $calendared = get_param('calendared');
    $announcement->calendared($calendared);
    $vote = get_param('vote');
    $announcement->vote($vote);
    $fiscal = get_param('fiscal');
    $announcement->fiscal_impact($vote);
    $staffing = get_param('staffing');
    $announcement->staffing_impact($vote);
    if ($announcement_id) {
        $announcement->update();
    } else {
        $announcement_id = $announcement->insert();
    }
    // tags second
    $tag_list = get_param('tag_list');
    $tags = explode('|', $tag_list);