} else {
            showtablerow('class="first"', array('class="th11"'), array(cplang($Plang['smstong_members_sendsms_members']), cplang('members_search_result', array('membernum' => $membernum)) . "<a href=\"###\" onclick=\"\$('searchmembers').style.display='';\$('sendsms').style.display='none';\$('step1').className='current';\$('step2').className='';\" class=\"act\">{$lang['research']}</a>&nbsp;<strong>{$Plang['smstong_members_sendsms_notice1']}</strong>"));
            showtagheader('tbody', 'messagebody', TRUE);
            showsendsms();
            showtagfooter('tbody');
            $search_condition = serialize($search_condition);
            showsubmit('sendsmssubmit', 'submit', 'td', '<input type="hidden" name="conditions" value=\'' . $search_condition . '\' />');
        }
        showtablefooter();
        showformfooter();
        showtagfooter('div');
    }
} else {
    $search_condition = unserialize(stripslashes($_POST['conditions']));
    $membernum = countmembers($search_condition);
    notifymembers('sendsms', 'sendsms');
}
function showsearchform($operation = '')
{
    global $_G, $lang;
    $groupselect = array();
    $usergroupid = isset($_G['gp_usergroupid']) && is_array($_G['gp_usergroupid']) ? $_G['gp_usergroupid'] : array();
    $query = DB::query("SELECT type, groupid, grouptitle, radminid FROM " . DB::table('common_usergroup') . " WHERE groupid NOT IN ('6', '7') ORDER BY (creditshigher<>'0' || creditslower<>'0'), creditslower, groupid");
    while ($group = DB::fetch($query)) {
        $group['type'] = $group['type'] == 'special' && $group['radminid'] ? 'specialadmin' : $group['type'];
        $groupselect[$group['type']] .= "<option value=\"{$group['groupid']}\" " . (in_array($group['groupid'], $usergroupid) ? 'selected' : '') . ">{$group['grouptitle']}</option>\n";
    }
    $groupselect = '<optgroup label="' . $lang['usergroups_member'] . '">' . $groupselect['member'] . '</optgroup>' . ($groupselect['special'] ? '<optgroup label="' . $lang['usergroups_special'] . '">' . $groupselect['special'] . '</optgroup>' : '') . ($groupselect['specialadmin'] ? '<optgroup label="' . $lang['usergroups_specialadmin'] . '">' . $groupselect['specialadmin'] . '</optgroup>' : '') . '<optgroup label="' . $lang['usergroups_system'] . '">' . $groupselect['system'] . '</optgroup>';
    showtagheader('div', 'searchmembers', !$_G['gp_submit']);
    echo '<script src="static/js/calendar.js" type="text/javascript"></script>';
    echo '<style type="text/css">#residedistrictbox select, #birthdistrictbox select{width: auto;}</style>';
Esempio n. 2
0
                showsubtitle(array('medals_grant', 'medals_image', 'name'));
                echo $medals;
                showtablefooter();
                echo '</td></tr>';
                showtagheader('tbody', 'messagebody');
                shownewsletter();
                showtagfooter('tbody');
                showsubmit('confermedalsubmit', 'submit', 'td', '<input class="checkbox" type="checkbox" name="notifymembers" value="1" onclick="$(\'messagebody\').style.display = this.checked ? \'\' : \'none\'" id="grant_notify"/><label for="grant_notify">' . lang('medals_grant_notify') . '</label>');
            }
            showtablefooter();
            showformfooter();
            showtagfooter('div');
        }
    } else {
        countmembers();
        notifymembers('confermedal', 'medalletter');
    }
} elseif ($operation == 'add') {
    if (!submitcheck('addsubmit')) {
        $groupselect = array();
        $query = $db->query("SELECT groupid, type, grouptitle, creditshigher, radminid FROM {$tablepre}usergroups WHERE type='member' AND creditshigher='0' OR (groupid NOT IN ('5', '6', '7') AND radminid<>'1' AND type<>'member') ORDER BY (creditshigher<>'0' || creditslower<>'0'), creditslower, groupid");
        while ($group = $db->fetch_array($query)) {
            $group['type'] = $group['type'] == 'special' && $group['radminid'] ? 'specialadmin' : $group['type'];
            if ($group['type'] == 'member' && $group['creditshigher'] == 0) {
                $groupselect[$group['type']] .= "<option value=\"{$group['groupid']}\" selected>{$group['grouptitle']}</option>\n";
            } else {
                $groupselect[$group['type']] .= "<option value=\"{$group['groupid']}\">{$group['grouptitle']}</option>\n";
            }
        }
        $groupselect = '<optgroup label="' . $lang['usergroups_member'] . '">' . $groupselect['member'] . '</optgroup>' . ($groupselect['special'] ? '<optgroup label="' . $lang['usergroups_special'] . '">' . $groupselect['special'] . '</optgroup>' : '') . ($groupselect['specialadmin'] ? '<optgroup label="' . $lang['usergroups_specialadmin'] . '">' . $groupselect['specialadmin'] . '</optgroup>' : '') . '<optgroup label="' . $lang['usergroups_system'] . '">' . $groupselect['system'] . '</optgroup>';
        shownav('user', 'nav_members_add');
Esempio n. 3
0
                showtablefooter();
                showtagheader('div', 'messagebody');
                shownewsletter();
                showtagfooter('div');
                showsubmit('confermagicsubmit', 'submit', 'td', '<input class="checkbox" type="checkbox" name="notifymember" value="1" onclick="$(\'messagebody\').style.display = this.checked ? \'\' : \'none\'" id="grant_notify"/><label for="grant_notify">' . cplang('magics_grant_notify') . '</label>');
            }
            showtablefooter();
            showformfooter();
            showtagfooter('div');
        }
    } else {
        if (!empty($_POST['conditions'])) {
            $search_condition = dunserialize($_POST['conditions']);
        }
        $membernum = countmembers($search_condition, $urladd);
        notifymembers('confermagic', 'magicletter');
    }
} elseif ($operation == 'add') {
    if (!submitcheck('addsubmit')) {
        $groupselect = array();
        $query = C::t('common_usergroup')->fetch_all_by_not_groupid(array(5, 6, 7));
        foreach ($query as $group) {
            $group['type'] = $group['type'] == 'special' && $group['radminid'] ? 'specialadmin' : $group['type'];
            if ($group['type'] == 'member' && $group['creditshigher'] == 0) {
                $groupselect[$group['type']] .= "<option value=\"{$group['groupid']}\" selected>{$group['grouptitle']}</option>\n";
            } else {
                $groupselect[$group['type']] .= "<option value=\"{$group['groupid']}\">{$group['grouptitle']}</option>\n";
            }
        }
        $groupselect = '<optgroup label="' . $lang['usergroups_member'] . '">' . $groupselect['member'] . '</optgroup>' . ($groupselect['special'] ? '<optgroup label="' . $lang['usergroups_special'] . '">' . $groupselect['special'] . '</optgroup>' : '') . ($groupselect['specialadmin'] ? '<optgroup label="' . $lang['usergroups_specialadmin'] . '">' . $groupselect['specialadmin'] . '</optgroup>' : '') . '<optgroup label="' . $lang['usergroups_system'] . '">' . $groupselect['system'] . '</optgroup>';
        shownav('user', 'nav_members_add');
                }
            }
        }
        $_G['gp_mobile'] = trim($mobile, ",");
    }
    showtablerow('', array('class="th12"', ''), array($Plang['smstong_members_qunfasms_mobile'], '<textarea name="mobile" cols="100" rows="25">' . $_G['gp_mobile'] . '</textarea>'));
    showtagheader('tbody', 'messagebody', TRUE);
    showsendsms();
    showtagfooter('tbody');
    $search_condition = serialize($search_condition);
    showsubmit('qunfasmssubmit', 'submit', 'td', '<input type="hidden" name="conditions" value=\'' . $search_condition . '\' />');
    showtablefooter();
    showformfooter();
    showtagfooter('div');
} else {
    notifymembers('qunfasms', 'qunfasms');
}
function showsendsms()
{
    global $_G;
    global $lang;
    global $Plang;
    showtablerow('', array('class="th12"', ''), array($Plang['smstong_members_qunfasms_content'], '<a href="' . ADMINSCRIPT . '?action=plugins&operation=config&do=' . $pluginid . '&identifier=smstong&pmod=qunfasms&getmobile=true">' . $Plang['smstong_members_qunfasms_getmobile'] . '</a><br /><br /><textarea name="message" cols="100" rows="10">' . $_G['gp_content'] . '</textarea>'));
    showtablerow('', array('class="th12"', ''), array('', '<strong>' . $Plang['smstong_members_qunfasms_notice'] . '</strong>'));
}
function notifymembers($operation, $variable)
{
    global $_G, $lang, $Plang, $urladd;
    $mobile = $message = '';
    $mobile = $_G['gp_mobile'];
    $message = $_G['gp_message'];