コード例 #1
0
ファイル: functions.php プロジェクト: severnaya99/Sg-2010
function forum_make_jumpbox($forum_id = 0)
{
	$box = '<form name="forum_jumpbox" method="get" action="viewforum.php" onsubmit="javascript: if(document.forum_jumpbox.forum.value &lt; 1){return false;}">';
	$box .= '<select class="select" name="forum" onchange="javascript: if(this.options[this.selectedIndex].value >0 ){ document.forms.forum_jumpbox.submit();}">';
    $box .= forum_forumSelectBox($forum_id);
    $box .= "</select> <input type='submit' class='button' value='"._GO."' /></form>";
    unset($xforums, $categories);
    return $box;
}
コード例 #2
0
ファイル: forum_block.php プロジェクト: severnaya99/Sg-2010
function b_forum_author_edit($options)
{
    $form  = _MB_XFORUM_CRITERIA."<select name='options[0]'>";
    $form .= "<option value='post'";
	    if($options[0]=="post") $form .= " selected='selected' ";
	    $form .= ">"._MB_XFORUM_CRITERIA_POST."</option>";
    $form .= "<option value='topic'";
	    if($options[0]=="topic") $form .= " selected='selected' ";
	    $form .= ">"._MB_XFORUM_CRITERIA_TOPIC."</option>";
    $form .= "<option value='digest'";
	    if($options[0]=="digest") $form .= " selected='selected' ";
	    $form .= ">"._MB_XFORUM_CRITERIA_DIGESTS."</option>";
    $form .= "<option value='sticky'";
	    if($options[0]=="sticky") $form .= " selected='selected' ";
	    $form .= ">"._MB_XFORUM_CRITERIA_STICKYS."</option>";
    $form .= "</select>";
    $form .= "<br />" . _MB_XFORUM_DISPLAY."<input type='text' name='options[1]' value='" . $options[1] . "' />";
    $form .= "<br />" . _MB_XFORUM_TIME."<input type='text' name='options[2]' value='" . $options[2] . "' />";
    $form .= "<br />&nbsp;&nbsp;&nbsp;&nbsp;<small>" . _MB_XFORUM_TIME_DESC. "</small>";
    $form .= "<br />" . _MB_XFORUM_DISPLAYMODE. "<input type='radio' name='options[3]' value='0'";
    if ($options[3] == 0) {
        $form .= " checked='checked'";
    }
    $form .= " />&nbsp;" . _MB_XFORUM_DISPLAYMODE_COMPACT . "<input type='radio' name='options[3]' value='1'";
    if ($options[3] == 1) {
        $form .= " checked='checked'";
    }
    $form .= " />&nbsp;" . _MB_XFORUM_DISPLAYMODE_LITE;

    $form .= "<br />" . _MB_XFORUM_INDEXNAV."<input type=\"radio\" name=\"options[4]\" value=\"1\"";
    if ($options[4] == 1) $form .= " checked=\"checked\"";
    $form .= " />"._YES."<input type=\"radio\" name=\"options[4]\" value=\"0\"";
    if ($options[4] == 0) $form .= " checked=\"checked\"";
    $form .= " />"._NO;

    $form .= "<br /><br />" . _MB_XFORUM_FORUMLIST;

    $options_forum = array_filter(array_slice($options, 5), "b_forum_array_filter"); // get allowed forums
    $isAll = (count($options_forum)==0||empty($options_forum[0]))?true:false;
    $form .= "<br />&nbsp;&nbsp;<select name=\"options[]\" multiple=\"multiple\">";
    $form .= "<option value=\"0\" ";
    if ($isAll) $form .= " selected=\"selected\"";
    $form .= ">"._ALL."</option>";
    $form .= forum_forumSelectBox($options_forum);
    /*
	$forum_handler =& xoops_getmodulehandler('forum', 'xforum');
	$xforums = $forum_handler->getForumsByCategory(0, '', false);
	foreach (array_keys($xforums) as $c) {
		foreach(array_keys($xforums[$c]) as $f){
        	$sel = ($isAll || in_array($f, $options_forum))?" selected=\"selected\"":"";
        	$form .= "<option value=\"$f\" $sel>".$xforums[$c][$f]["title"]."</option>";
	        if(!isset($xforums[$c][$f]["sub"])) continue;
			foreach(array_keys($xforums[$c][$f]["sub"]) as $s){
        		$sel = ($isAll || in_array($s, $options_forum))?" selected=\"selected\"":"";
        		$form .= "<option value=\"$s\" $sel>-- ".$xforums[$c][$f]["sub"][$s]["title"]."</option>";
			}
		}
	}
    unset($xforums);
    */
    $form .= "</select><br />";

    return $form;
}