Пример #1
0
function showSearchDiv() {

	echo '<div class="qqqun_bblist">';
	showSearchForm();
	showSearchResultDiv();
	echo '</div>';

}
Пример #2
0
 }
 $subLink = nc_folder_path($cc_env['Subdivision_ID']);
 $ccLink = nc_infoblock_path($cc_env['Sub_Class_ID']);
 if (!$cc_env['File_Mode']) {
     // get component body
     $component_body = $cc_env['RecordTemplateFull'] . $cc_env['Settings'];
     // other forms
     $cc_env["AddTemplate"] = $cc_env["AddTemplate"] ? $cc_env["AddTemplate"] : $component->add_form($catalogue, $sub, $cc);
     $cc_env["FullSearchTemplate"] = $cc_env["FullSearchTemplate"] ? $cc_env["FullSearchTemplate"] : $component->search_form(1);
 } else {
     // get component body
     $component_body = nc_check_file($file_class->get_field_path('RecordTemplateFull')) ? nc_get_file($file_class->get_field_path('RecordTemplateFull')) : null;
     $component_body .= nc_check_file($file_class->get_field_path('Settings')) ? nc_get_file($file_class->get_field_path('Settings')) : null;
 }
 // FIXME: Сломано (не определены переменные-аргументы showSearchForm):
 $nc_search_form = "<form method='get' action='" . nc_folder_path($current_sub['Subdivision_ID']) . "'>" . showSearchForm($field_descript, $field_type, $field_search, $field_format) . "<input type='submit' value='" . NETCAT_SEARCH_FIND_IT . "' /></form>";
 $routing_object_parameters = !$routing_module_enabled ? null : array('site_id' => $catalogue, 'folder' => substr($f_Hidden_URL, strlen($SUB_FOLDER)), 'folder_id' => $f_Subdivision_ID, 'infoblock_id' => $f_Sub_Class_ID, 'infoblock_keyword' => $cc_env['EnglishName'], 'object_id' => $f_RowID, 'object_keyword' => $f_Keyword, 'action' => 'full', 'format' => 'html', 'date' => $date_field ? date("Y-m-d", strtotime(${"f_{$date_field}"})) : null);
 if ($admin_mode) {
     if ($nc_core->inside_admin) {
         $fullLink = $routing_module_enabled ? nc_routing::get_object_path($classID, $routing_object_parameters) : $subLink . ($f_Keyword ? $f_Keyword : $cc_env['EnglishName'] . "_" . $f_RowID) . ".html";
         $UI_CONFIG->replace_view_link_url($fullLink);
     }
     $addLink = $admin_url_prefix . "add.php?catalogue=" . $catalogue . "&amp;sub=" . $sub . "&amp;cc=" . $cc;
     // full link section
     $fullLink = $admin_url_prefix . "full.php?catalogue=" . $catalogue . "&sub=" . $sub . "&cc=" . $cc . "&message=" . $f_RowID;
     $fullDateLink = $fullLink . $dateLink;
     // ID объекта в шаблоне
     $f_AdminButtons_id = $f_RowID;
     // Приоритет объекта
     $f_AdminButtons_priority = $f_Priority;
     // ID добавившего пользователя
Пример #3
0
<?php

if (!defined('includeConst')) {
    die('Direct access not permitted');
}
if (isset($_GET['a']) && $_GET['a'] == "search") {
    showSearchResults($db, $userName, $group, $role);
} else {
    showSearchForm($userName, $group, $role);
}
function showSearchForm($userName, $group, $role)
{
    ?>
  <body>

      <main class="filters">
          <?php 
    include "header.inc";
    ?>
          <div class="two">
              <h1>Find A Group</h1>
              <form id="searchForm" action="?page=groupSearch&amp;a=search" method="POST">
                  <label for="fieldSelect">Preferred Project Type</label><br>
                  <select name="field" id="fieldSelect">
                    <option value="">Any</option>
                    <option value="Web Development">Web Development</option>
                    <option value="Programming">Programming</option>
                    <option value="Project Leadership">Design</option>
                    <option value="Business">Business</option>
                  </select>
                  <br><br>
Пример #4
0
 // upload operations
 case "upload":
     require_once $_DOCMAN->getPath('includes_f', 'upload');
     showDocumentUpload($gid, $script, 0);
     break;
     // license operations
 // license operations
 case "license_result":
     require_once $_DOCMAN->getPath('includes_f', 'download');
     licenseDocumentProcess($gid);
     break;
     // search operations
 // search operations
 case "search_form":
     require_once $_DOCMAN->getPath('includes_f', 'search');
     showSearchForm($gid, $Itemid);
     break;
 case "search_result":
     require_once $_DOCMAN->getPath('includes_f', 'search');
     showSearchResult($gid, $Itemid);
     break;
     // DOClink
 // DOClink
 case "doclink":
     require_once $_DOCMAN->getPath('includes_f', 'doclink');
     showDoclink();
     break;
 case "doclink-listview":
     require_once $_DOCMAN->getPath('includes_f', 'doclink');
     showListview();
     break;
Пример #5
0
/**
 * Функция генерации формы добавления, редактирования, поиска, в зависимости от $action
 * @param string "add", "change", "search", "message"
 * @param array $fields массив с полями
 * @return string форма
 */
function nc_fields_form_fs($action, $fields = null, $class_id = 0)
{
    global $ROOT_FOLDER, $MODULE_VARS, $SUB_FOLDER, $HTTP_ROOT_PATH, $ADMIN_PATH;
    global $AUTHORIZE_BY, $systemTableID, $user_table_mode, $admin_mode, $nc_core;
    if (!in_array($action, array("add", "change", "search", "message"))) {
        return false;
    }
    ###|| ($systemTableID && !$user_table_mode)
    // необходимо записать в глобальные переменные, поскольку они используется
    // в функция вида nc_string_field
    if (!empty($fields)) {
        $GLOBALS['fldCount'] = count($fields);
        $GLOBALS['fldID'] = array();
        $GLOBALS['fld'] = array();
        $GLOBALS['fldName'] = array();
        $GLOBALS['fldType'] = array();
        $GLOBALS['fldFmt'] = array();
        $GLOBALS['fldNotNull'] = array();
        $GLOBALS['fldDefault'] = array();
        $GLOBALS['fldTypeOfEdit'] = array();
        $GLOBALS['fldDoSearch'] = array();
        foreach ($fields as $v) {
            $GLOBALS['fldID'][] = $v['id'];
            $GLOBALS['fld'][] = $v['name'];
            $GLOBALS['fldName'][] = $v['description'];
            $GLOBALS['fldType'][] = $v['type'];
            $GLOBALS['fldFmt'][] = $v['format'];
            $GLOBALS['fldNotNull'][] = $v['not_null'];
            $GLOBALS['fldDefault'][] = $v['default'];
            $GLOBALS['fldTypeOfEdit'][] = $v['edit_type'];
            $GLOBALS['fldDoSearch'][] = $v['search'];
        }
    }
    if (isset($GLOBALS['fld']) && is_array($GLOBALS['fld'])) {
        $fldCount = $GLOBALS['fldCount'];
        $fldID = $GLOBALS['fldID'];
        $fld = $GLOBALS['fld'];
        $fldName = $GLOBALS['fldName'];
        $fldValue = isset($GLOBALS['fldValue']) ? $GLOBALS['fldValue'] : '';
        $fldType = $GLOBALS['fldType'];
        $fldFmt = $GLOBALS['fldFmt'];
        $fldNotNull = $GLOBALS['fldNotNull'];
        $fldInheritance = isset($GLOBALS['fldInheritance']) ? $GLOBALS['fldInheritance'] : 0;
        $fldDefault = $GLOBALS['fldDefault'];
        $fldTypeOfEdit = $GLOBALS['fldTypeOfEdit'];
        $fldDoSearch = $GLOBALS['fldDoSearch'];
    }
    # тут будет храниться вывод
    $result = "";
    if ($action == 'add' && $systemTableID && $user_table_mode) {
        $nc_auth = nc_auth::get_object();
        return $nc_auth->add_form_fs();
    }
    switch ($action) {
        # форма добавления или редактирования
        case "add":
        case "change":
            if (!$systemTableID || $systemTableID && $user_table_mode) {
                $result = "<?=( \$warnText ? \"<div class='warnText'>\$warnText</div>\" : NULL )?>\n<form name='adminForm' id='adminForm' class='nc-form' enctype='multipart/form-data' method='post' action='<?= \$SUB_FOLDER ?><?= \$HTTP_ROOT_PATH ?>" . ($action == "add" ? "add" : ($action == "change" ? "message" : "")) . ".php'>\n<div id='nc_moderate_form'>\n<div class='nc_clear'></div>\n<input name='admin_mode' type='hidden' value='<?= \$admin_mode ?>' />\n<?= \$nc_core->token->get_input() ?>\n<input name='catalogue' type='hidden' value='<?= \$catalogue ?>' />\n<input name='cc' type='hidden' value='<?= \$cc ?>' />\n<input name='sub' type='hidden' value='<?= \$sub ?>' />";
                $result .= $action == "change" ? "<input name='message' type='hidden' value='<?= \$message ?>' />\r\n" : "";
                $result .= "<input name='posting' type='hidden' value='1' />\n<input name='curPos' type='hidden' value='<?= \$curPos ?>' />\n<input name='f_Parent_Message_ID' type='hidden' value='<?= \$f_Parent_Message_ID ?>' />\n<?= nc_form_moderate('" . $action . "', \$admin_mode, " . ($user_table_mode + 0) . ", \$systemTableID, \$current_cc, (isset(\$f_Checked) ? \$f_Checked  : null), \$f_Priority , \$f_Keyword, \$f_ncTitle, \$f_ncKeywords, \$f_ncDescription ) ?>\n</div>\n";
            }
            # проходимся по полям
            for ($i = 0; $i < $fldCount; $i++) {
                # описание поля
                $fldNameTempl = $fldName[$i] . ($fldNotNull[$i] ? " (*)" : "") . ":<br />\r\n";
                # редактировать поле могут:
                $no_edit = $fldTypeOfEdit[$i] == 3;
                $admin_edit = $fldTypeOfEdit[$i] == 2;
                if ($user_table_mode && $fld[$i] == $AUTHORIZE_BY && $action == "change" && !$nc_core->get_settings('allow_change_login', 'auth')) {
                    $no_edit = true;
                }
                # если поле не для редактирования - хендовер
                if ($no_edit) {
                    continue;
                }
                $field_html = "";
                # типы полей
                switch ($fldType[$i]) {
                    case 1:
                        // String
                        $field_html .= "<?= nc_string_field('{$fld[$i]}', \"maxlength='255' size='50'\", (\$class_id ? \$class_id : \$classID), 1) ?><br />\r\n";
                        break;
                    case 2:
                        // Int
                        $field_html .= "<?= nc_int_field('{$fld[$i]}', \"maxlength='12' size='12'\", (\$class_id ? \$class_id : \$classID), 1) ?><br />\r\n";
                        break;
                    case 3:
                        // Text
                        $field_html .= "<?= nc_text_field('{$fld[$i]}', \"\", (\$class_id ? \$class_id : \$classID), 1) ?><br />\r\n";
                        break;
                    case 4:
                        // List
                        $field_html .= "<?= nc_list_field('{$fld[$i]}', \"\", (\$class_id ? \$class_id : \$classID), 1) ?><br />\r\n";
                        break;
                    case 5:
                        // Bool
                        $field_html .= "<?= nc_bool_field('{$fld[$i]}', \"\", (\$class_id ? \$class_id : \$classID ), 1) ?><br />\r\n";
                        break;
                    case 6:
                        // File
                        $field_html .= "<?= nc_file_field('{$fld[$i]}', \"size='50'\", (\$class_id ? \$class_id : \$classID), 1) ?><br />\r\n";
                        break;
                    case 7:
                        // Float
                        $field_html .= "<?= nc_float_field('{$fld[$i]}', \"maxlength='12' size='12'\", ( \$class_id ? \$class_id : \$classID), 1) ?><br />\r\n";
                        break;
                    case 8:
                        // DateTime
                        $field_html .= "<?= nc_date_field('{$fld[$i]}', \"\", (\$class_id ? \$class_id : \$classID), 1) ?><br />\r\n";
                        break;
                    case 9:
                        // Relation
                        $field_html .= "<?= nc_related_field('{$fld[$i]}', \"\") ?><br />\r\n";
                        break;
                    case 10:
                        // Multiselect
                        $field_html .= "<?= nc_multilist_field('{$fld[$i]}', \"\", \"\", (\$class_id ? \$class_id : \$classID), 1) ?><br />\r\n";
                        break;
                    case 11:
                        // Multifile
                        $field_html .= "<?= \$f_{$fld[$i]}->form() ?><br />\r\n";
                        break;
                }
                if ($admin_edit) {
                    $field_html = "<? if (nc_field_check_admin_perm()) { ?>\n" . $field_html . "<? } ?>";
                }
                $result .= $field_html . "<br />\r\n";
            }
            if (!$systemTableID || $systemTableID && $user_table_mode) {
                # caption для кнопки
                switch ($action) {
                    case "add":
                        $submitBtnName = "NETCAT_MODERATION_BUTTON_ADD";
                        break;
                    case "change":
                        $submitBtnName = "NETCAT_MODERATION_BUTTON_CHANGE";
                        break;
                }
                $resetBtnName = "NETCAT_MODERATION_BUTTON_RESET";
                if ($user_table_mode && $posting == 0 && $action == "add") {
                    $result .= NETCAT_MODERATION_PASSWORD . ":<br/><input name='Password1' type='password' size='25' maxlength='32' value='' /><br/><br/>";
                    $result .= NETCAT_MODERATION_PASSWORDAGAIN . ":<br/><input name='Password2' type='password' size='25' maxlength='32' value='' /><br/><br/>";
                }
                # защита картинкой
                if ($action == "add" && $MODULE_VARS["captcha"] && function_exists("imagegif")) {
                    $result .= "<? if (!\$AUTH_USER_ID && \$current_cc['UseCaptcha'] && \$MODULE_VARS['captcha']) { ?><?= nc_captcha_formfield() ?><br/><br/><?= NETCAT_MODERATION_CAPTCHA ?> (*):<br/><input type='text' name='nc_captcha_code' size='10'><br/><br/><? } ?>\r\n";
                }
                $result .= "<div><?= NETCAT_MODERATION_INFO_REQFIELDS ?></div><br/>\r\n";
                $result .= "<?= nc_submit_button({$submitBtnName}) ?>\r\n";
                $result .= "</form>";
            }
            break;
            # поиск
        # поиск
        case "search":
            # функция генерации формы поиска из файла "/require/s_list.inc.php"
            # для работы нужны данные из "message_fields.php"
            $srchFrm = showSearchForm($fldName, $fldType, $fldDoSearch, $fldFmt);
            // если нет полей для поиска
            if (!$srchFrm) {
                return "";
            }
            $form_action = "<?= (\$admin_mode ? \$HTTP_ROOT_PATH.'index.php?' : nc_infoblock_path(\$current_cc['Sub_Class_ID']) ) ?>";
            $result .= "<form action='{$form_action}' method='get'>\n<? if (\$admin_mode || \$inside_admin) : ?>\n        <input type='hidden' name='admin_mode' value='1' />\n        <input name='catalogue' type='hidden' value='<?= \$catalogue ?>' />\n        <input name='cc' type='hidden' value='<?= \$cc ?>' />\n        <input name='sub' type='hidden' value='<?= \$sub ?>' />\n<? endif; ?>\n<? if (\$inside_admin) : ?>\n        <input type='hidden' name='inside_admin' value='1' />\n<? endif; ?>\n<input type='hidden' name='action' value='index' />\n<input type='hidden' name='admin_mode' value='<?= \$admin_mode ?>' />\n{$srchFrm}\n<input value='<?= NETCAT_SEARCH_FIND_IT ?>' type='submit' />\n</form>";
            break;
        case "message":
            # Альтернативная форма удаления
            $result = "<? " . "\$f_delete_true = \$admin_mode\r\n" . "  ? \$admin_url_prefix.\"message.php?" . ($nc_core->token->is_use('drop') ? "\".\$nc_core->token->get_url().\"&amp;" : "") . "catalogue=\".\$catalogue.\"&sub=\".\$sub.\"&cc=\".\$cc.\"&message=\".\$message.\"&delete=1&posting=1&curPos=\".\$curPos.\"&admin_mode=1\".\$system_env['AdminParameters']\r\n" . "  : nc_object_path(\$current_cc['Class_ID'], \$message, 'drop', 'html', false, array('nc_token' => \$nc_core->token->get()));?>\r\n" . "<?= sprintf(NETCAT_MODERATION_WARN_COMMITDELETION, \$message) ?><br/><br/>\r\n";
            $result .= "<a href='<?= \$f_delete_true ?>'><?= NETCAT_MODERATION_COMMON_KILLONE ?></a> | <a href='<?= \$goBackLink.\$system_env['AdminParameters'] ?>'><?= NETCAT_MODERATION_BACKTOSECTION ?></a>\r\n";
    }
    return $result;
}
Пример #6
0
$xoopsTpl -> assign ( 'lang_moduledirname', $xoopsModule->dirname() );
$xoopsTpl -> assign ( 'lang_config', intval($xoopsModuleConfig["allowsubmit"]) );
$xoopsTpl -> assign ( 'lang_home', constant("_MD_{$MYDIRNAME}_HOME") );
$xoopsTpl -> assign ( 'lang_seachhead', constant("_MD_{$MYDIRNAME}_SEARCHHEAD") );
$xoopsTpl -> assign ( 'lang_still', constant("_MD_{$MYDIRNAME}_STILLNOTHINGHERE") );
$xoopsTpl -> assign ( 'lang_1st', constant("_MD_{$MYDIRNAME}_READMEFIRST") );
$xoopsTpl -> assign ( 'lang_now', constant("_MD_{$MYDIRNAME}_NOW") );
$xoopsTpl -> assign ( 'lang_defs', constant("_MD_{$MYDIRNAME}_DEFS") );
$xoopsTpl -> assign ( 'lang_cats', constant("_MD_{$MYDIRNAME}_CATS") );
$xoopsTpl -> assign ( 'lang_seachent', constant("_MD_{$MYDIRNAME}_SEARCHENTRY") );
$xoopsTpl -> assign ( 'lang_rubyl', constant("_MD_{$MYDIRNAME}_RUBYL") );
$xoopsTpl -> assign ( 'lang_rubyr', constant("_MD_{$MYDIRNAME}_RUBYR") );
$xoopsTpl -> assign ( 'lang_yomi', constant("_MD_{$MYDIRNAME}_ENTRYYOMI") );
$xoopsTpl -> assign ( 'lang_letterdef', constant("_MD_{$MYDIRNAME}_LETTERDEFINS") );
$xoopsTpl -> assign ( 'lang_return', constant("_MD_{$MYDIRNAME}_RETURN") );
$xoopsTpl -> assign ( 'lang_index', constant("_MD_{$MYDIRNAME}_RETURN2INDEX") );
$xoopsTpl -> assign ( 'config_req', intval($xoopsModuleConfig["allowreq"]) );
$xoopsTpl -> assign ( 'amazon_id', $myts -> makeTboxData4Show($xoopsModuleConfig["amazon_id"] ));
$xoopsTpl -> assign ( 'searchstring', $searchstring );
$xoopsTpl -> assign ( 'config_readme', $myts -> displayTarea($xoopsModuleConfig["readme1st"],1,1,1,1,1) );
$xoopsTpl -> assign ( 'titleblockuse', intval($xoopsModuleConfig["titleblockuse"]) );
$xoopsTpl -> assign ( 'h1id', $myts -> makeTboxData4Show( $xoopsModuleConfig["h1id"] ) );
$xoopsTpl -> assign ( 'searchform', showSearchForm($query,$type,$catID,$andor));
$xoopsTpl -> assign ( 'totalcats', countCats() );
$xoopsTpl -> assign ( 'publishedwords', countWords() );
$xoopsTpl -> assign ( 'intro', $intro );
$xoopsTpl -> assign ( 'multicats', $xoopsModuleConfig['multicats'] );
$xoopsTpl -> assign ( 'resultset', $resultset );

include(XOOPS_ROOT_PATH.'/footer.php');
?>
        } else {
            if (isset($_SESSION['searchData'])) {
                $buildings = Idp_Main::searchBuildings($_SESSION['searchData'], $image_mode, false, $list_start, $per_page);
            } else {
                $buildings = Idp_Main::getBuildings(false, $list_start, $per_page, 'published');
            }
        }
    }
    ?>
	
		</div>                    
    </div>
			
 <!-- CONTENT START -->
	<?php 
    showSearchForm($searchParameters);
    if ($_POST || isset($_SESSION['searchData'])) {
        if ($pagination_count == 0) {
            ?>
			<div class="alert alert-danger"><strong>
				<?php 
            $image_mode == false ? print __('No buildings found.', 'idp-theme') : (print __('No Images found.', 'idp-theme'));
            ?>
			</strong></div>
			<?php 
        } else {
            ?>
			<div class="alert alert-success">
				<strong>
					<?php 
            $image_mode == false ? printf(esc_html(_n('%d building found.', '%d buildings found.', $pagination_count, 'idp-theme')), $pagination_count) : printf(esc_html(_n('%d image found.', '%d images found.', $pagination_count, 'idp-theme')), $pagination_count);
Пример #8
0

        <table class="default">
            <colgroup>
                <col width="20">
                <col width="40%">
                <col width="20%">
                <col width="30%">
                <col>
            </colgroup>
            <caption>
                <?php 
echo _('Berechtigungen');
?>
                <span class="actions">
                    <? showSearchForm('search_perm_user', $search_string_search_perm_user, false, false, false, true) ?>
                </span>
            </caption>
            <thead>
            <tr>
                <th colspan="2"><?php 
echo _('Name');
?>
</th>
                <th colspan="2"><?php 
echo _('Berechtigung');
?>
</th>
                <th><?php 
echo _('Aktion');
?>
Пример #9
0
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>
                <?php 
echo _('Diese NutzerInnen sind als globale Ressourcen-Administratoren mit folgenden Rechten eingetragen:');
?>
            </td>
            <td colspan="2">&nbsp;</td>
            <td valign="top">
                <label>
                    <?php 
echo _('NutzerInnen hinzufügen');
?>
<br>
                    <? showSearchForm('search_root_user', $search_string_search_root_user, TRUE, FALSE, TRUE) ?>
                </label>
            </td>
        </tr>
    <? foreach ($users as $user): ?>
        <tr>
            <td>&nbsp;</td>
            <td valign="top">
                <a href="<?php 
echo $resObject->getOwnerLink($user['user_id']);
?>
">
                    <?php 
echo $resObject->getOwnerName(TRUE, $user['user_id']);
?>
                </a>
Пример #10
0
$xoopsTpl -> assign ( 'lang_seach', constant("_MD_{$MYDIRNAME}_SEARCHENTRY") );
$xoopsTpl -> assign ( 'lang_subandreq', constant("_MD_{$MYDIRNAME}_SUBANDREQ") );
$xoopsTpl -> assign ( 'lang_sub', constant("_MD_{$MYDIRNAME}_SUB") );
$xoopsTpl -> assign ( 'lang_nosub', constant("_MD_{$MYDIRNAME}_NOSUB") );
$xoopsTpl -> assign ( 'lang_req', constant("_MD_{$MYDIRNAME}_REQ") );
$xoopsTpl -> assign ( 'lang_noreq', constant("_MD_{$MYDIRNAME}_NOREQ") );
$xoopsTpl -> assign ( 'lang_allcats', constant("_MD_{$MYDIRNAME}_ALLCATS") );
$xoopsTpl -> assign ( 'config_req', intval($xoopsModuleConfig["allowreq"]) );
$xoopsTpl -> assign ( 'config_readme', $myts -> displayTarea($xoopsModuleConfig["readme1st"],1,1,1,1,1) );
$xoopsTpl -> assign ( 'titleblockuse', intval($xoopsModuleConfig["titleblockuse"]) );
$xoopsTpl -> assign ( 'h1id', $myts -> makeTboxData4Show( $xoopsModuleConfig["h1id"] ) );
$xoopsTpl -> assign ( 'catsarrayuse', intval($xoopsModuleConfig["catsarrayuse"]) );
$xoopsTpl -> assign ( 'blocksperpage', intval($xoopsModuleConfig["blocksperpage"]) );
$xoopsTpl -> assign ( 'publishedwords', countWords() );
$xoopsTpl -> assign ( 'totalcats', intval(countCats()));
$xoopsTpl -> assign ( 'searchform', showSearchForm("",4,0,"OR"));
$xoopsTpl -> assign ( 'block0', catlinksArray () );

if (!$xoopsModuleConfig["catsarrayuse"])
	{
	$xoopsTpl -> assign ( 'alpha', alphaArray() );
	}

if ($xoopsModuleConfig["blocksperpage"] > 0)
	{
	$xoopsTpl -> assign ( 'block1', NewEntriesArray() );
//	$xoopsTpl -> assign ( 'block1', $block1);
	$xoopsTpl -> assign ( 'block2', PopEntriesArray() );
//	$xoopsTpl -> assign ( 'block2', $block2);
	$xoopsTpl -> assign ( 'random', $random );
	}
Пример #11
0
/**
 * Return html-code with form for user search
 *
 * @return string html-code
 */
function SearchUserForm($totalUsers)
{
    global $db, $ROOT_FOLDER, $INCLUDE_FOLDER, $admin_mode, $MODULE_VARS;
    global $systemTableID, $systemMessageID, $systemTableName, $ADMIN_PATH;
    global $UserID, $Checked, $grpID, $sort_by, $sort_order, $objcount, $nonConfirmed, $rightsIds;
    $module_subscriber = 0;
    if (nc_module_check_by_keyword('subscriber', 0)) {
        $module_subscriber = $MODULE_VARS['subscriber']['VERSION'] > 1 ? 2 : 1;
    }
    if (!$UserID) {
        $UserID = '';
    }
    if (!$Checked) {
        $Checked = 0;
    }
    if (!$grpID || !is_array($grpID)) {
        $grpID = array();
    }
    if (!$rightsIds || !is_array($rightsIds)) {
        $rightsIds = array();
    }
    if (!$sort_by) {
        $sort_by = 0;
    }
    if (!$sort_order) {
        $sort_order = 0;
    }
    if (!$objcount) {
        $objcount = 20;
    }
    if (!$nonConfirmed) {
        $nonConfirmed = 0;
    }
    if ($nonConfirmed) {
        $Checked = 2;
    }
    $html = "<fieldset id='userFormSearchOff' style='cursor: pointer;' onclick='this.style.display=\"none\";document.getElementById(\"userFormSearchOn\").style.display=\"\";'>";
    $html .= "<legend ><span style='color: #1A87C2; border-bottom: 1px dashed;'>" . CONTROL_USER_FUNCS_USERSGET . "</span>&nbsp;[" . $totalUsers . "]</legend>";
    $html .= "</fieldset>";
    $html .= "<fieldset id='userFormSearchOn' style='display: none'>";
    $html .= "<legend  style='cursor: pointer;' onclick='document.getElementById(\"userFormSearchOn\").style.display=\"none\";document.getElementById(\"userFormSearchOff\").style.display=\"\";'>";
    $html .= "<span style='color: #1A87C2; border-bottom: 1px dashed;'>" . CONTROL_USER_FUNCS_USERSGET . "</span>&nbsp;[" . $totalUsers . "]:";
    $html .= "</legend>";
    $html .= "\n  <form method='get' action='index.php' id='userSearchForm' style='background-color: #EEE; padding: 16px; margin-right: 16px;'>\n    <table border='0' cellpadding='0' cellspacing='0' width='97%'>\n      <tr>\n        <td width='5%'><nobr>ID: " . nc_admin_input_simple('UserID', $UserID, 5, '', "maxlength='15'") . "</nobr></td>\n        <td rowspan='2' style='padding-left: 45px'>" . CONTROL_USER_GROUP . "<br>";
    $html .= "<select name='grpID[]' multiple size='3'>";
    //<option value='0'>".CONTROL_USER_MAIL_ALLGROUPS;
    if ($Result = $db->get_results("SELECT `PermissionGroup_ID`, `PermissionGroup_Name` FROM `PermissionGroup`", ARRAY_N)) {
        foreach ($Result as $GroupArray) {
            $html .= "<option value='" . $GroupArray[0] . "' " . (in_array($GroupArray[0], $grpID) ? 'selected' : '') . ">" . $GroupArray[0] . ": " . $GroupArray[1] . "</option>";
        }
    }
    $html .= "</select>";
    $html .= "</td>";
    $html .= "<td rowspan=2>" . CONTROL_USER_RIGHTS_TYPE_OF_RIGHT . "<br>";
    $html .= "<select name='rightsIds[]' multiple size=3>";
    $html .= "<option value='" . DIRECTOR . "' " . (in_array(DIRECTOR, $rightsIds) ? 'selected' : '') . ">" . CONTROL_USER_RIGHTS_DIRECTOR . "</option>";
    $html .= "<option value='" . SUPERVISOR . "' " . (in_array(SUPERVISOR, $rightsIds) ? 'selected' : '') . ">" . CONTROL_USER_RIGHTS_SUPERVISOR . "</option>";
    $html .= "<option value='" . EDITOR . "' " . (in_array(EDITOR, $rightsIds) ? 'selected' : '') . ">" . CONTROL_USER_RIGHTS_EDITOR . "</option>";
    $html .= "<option value='" . MODERATOR . "' " . (in_array(MODERATOR, $rightsIds) ? 'selected' : '') . ">" . CONTROL_USER_RIGHTS_MODERATOR . "</option>";
    $html .= "<option value='" . DEVELOPER . "' " . (in_array(DEVELOPER, $rightsIds) ? 'selected' : '') . ">" . CONTROL_USER_RIGHTS_CLASSIFICATORADMIN . "</option>";
    if ($module_subscriber == 2) {
        $html .= "<option value='" . SUBSCRIBER . "' " . (in_array(SUBSCRIBER, $rightsIds) ? 'selected' : '') . ">" . CONTROL_USER_RIGHTS_SUBSCRIBER . "</option>";
    }
    $html .= "<option value='" . BAN . "' " . (in_array(BAN, $rightsIds) ? 'selected' : '') . ">" . CONTROL_USER_RIGHTS_BAN . "</option>";
    $html .= "<option value='" . GUEST . "' " . (in_array(GUEST, $rightsIds) ? 'selected' : '') . ">" . CONTROL_USER_RIGHTS_GUESTONE . "</option>";
    $html .= "</select>";
    $html .= "</td>";
    $html .= "</tr>\n              <tr>\n                  <td><nobr>\n                  " . nc_admin_radio_simple('Checked', '', CONTROL_USER_FUNCS_ALLUSERS, !$Checked, 'chk1', 'checked') . "\n                  " . nc_admin_radio_simple('Checked', 1, CONTROL_USER_FUNCS_ONUSERS, $Checked == 1, 'chk2') . "\n                  " . nc_admin_radio_simple('Checked', 2, CONTROL_USER_FUNCS_OFFUSERS, $Checked == 2, 'chk3') . "\n                  </nobr>\n                  </td>\n\n              </tr>\n              <tr>\n                    <td colspan='3' align='right' style='padding-right: 10px;'>\n                        <input style='background: #EEE; padding: 8px 6px 12px 6px; font-size: 15px; color: #333; border: 2px solid #1A87C2;' type='submit' class='s' value='" . CONTROL_USER_FUNCS_DOGET . "' title='" . CONTROL_USER_FUNCS_DOGET . "' />\n                    </td>\n              </tr>";
    require_once $INCLUDE_FOLDER . "s_list.inc.php";
    $is_there_any_files = 0;
    require $ROOT_FOLDER . "message_fields.php";
    if ($searchForm = showSearchForm($fldName, $fldType, $fldDoSearch, $fldFmt)) {
        $html .= " <tr>\n                <td colspan ='3' style='padding:0'>\n                  <fieldset>";
        $html .= $searchForm;
        $html .= "\n\n                  </fieldset>\n                </td>\n              </tr>";
    }
    $html .= "<tr><td colspan='3' style='padding:0'>\n\n      <br>\n      <fieldset>\n        <legend>" . CONTROL_USER_FUNCS_VIEWCONTROL . "</legend>\n        <table border ='0'>\n          <tr>\n            <td> " . CONTROL_USER_FUNCS_SORTBY . " </td>\n            <td>";
    $html .= "<select name='sort_by' style='width: 100%'>";
    $html .= "<option value='0' " . ($sort_by == 0 ? 'selected' : '') . " >" . CONTROL_USER_GROUP . "</option>";
    $html .= "<option value='1' " . ($sort_by == 1 ? 'selected' : '') . " >ID</option>";
    foreach ($fldID as $k => $v) {
        $html .= "<option value='" . $fldID[$k] . "' " . ($sort_by == $fldID[$k] ? 'selected' : '') . " >" . $fldName[$k] . "</option>";
    }
    $html .= "</select><br></td></tr>";
    $html .= "<tr><td>" . CONTROL_USER_FUNCS_SORT_ORDER . "</td><td>" . nc_admin_select_simple('', 'sort_order', array(CONTROL_USER_FUNCS_SORT_ORDER_ACS, CONTROL_USER_FUNCS_SORT_ORDER_DESC), $sort_order, "style='width: 100%'") . "</td><tr>\n      <tr><td>" . CONTROL_CLASS_CLASS_OBJECTSLIST_SHOW . "</td>\n      <td>" . nc_admin_input_simple('objcount', $objcount, 3) . "&nbsp;" . CONTROL_USER_FUNCS_USER_NUMBER_ON_THE_PAGE . "</td>\n      </tr></table>\n      </fieldset>\n\n      </td></tr><tr><td valign='bottom' align='right' colspan='3' style='padding-right: 10px;'/>\n      <input style='background: #EEE; padding: 8px 6px 12px 6px; font-size: 15px; color: #333; border: 2px solid #1A87C2;' type='submit' class='s' value='" . CONTROL_USER_FUNCS_DOGET . "' title='" . CONTROL_USER_FUNCS_DOGET . "'/>\n      <input type='hidden' name=phase value='2'/>\n      <input type='hidden' name='order_by' value='" . $order_by . "'/>\n\t    <input type='submit' class='hidden'/>\n\t    <input type='hidden' name='isSearch' value='1'/>\n      </form></td></tr></table>";
    $html .= "</fieldset><br>";
    return $html;
}
Пример #12
0
function ShowForm()
{
    global $db, $ROOT_FOLDER, $INCLUDE_FOLDER;
    global $systemTableID, $systemMessageID, $systemTableName;
    global $SPAM_FROM_NAME, $SPAM_FROM, $ADMIN_PATH;
    $nc_core = nc_Core::get_object();
    ?>
    <form name='main' id='main' method=post action="MessageToAll.php">

        <fieldset>
            <legend><?php 
    echo CONTROL_USER_MAIL_RULES;
    ?>
</legend>
            <table width=100%><tr><td>

                        <?php 
    $Result = $db->get_results("select PermissionGroup_ID, PermissionGroup_Name from PermissionGroup", ARRAY_N);
    print "<font color=gray>" . CONTROL_USER_MAIL_GROUP . ":</font><br><SELECT NAME=PermissionGroupID>";
    print "<OPTION VALUE=0>" . CONTROL_USER_MAIL_ALLGROUPS;
    print "</OPTION>\n";
    foreach ($Result as $GroupArray) {
        print "  <OPTION ";
        print "VALUE=" . $GroupArray[0] . ">";
        print $GroupArray[0] . ": " . $GroupArray[1];
        print "</OPTION>";
    }
    print "</SELECT><br><br>";
    require_once $INCLUDE_FOLDER . "s_files.inc.php";
    require $ROOT_FOLDER . "message_fields.php";
    if ($searchForm = showSearchForm($fldName, $fldType, $fldDoSearch, $fldFmt)) {
        ?>
                            <fieldset>
                                <table width=100%><tr><td>
                                            <?php 
        echo $searchForm;
        ?>
                                        </td></tr></table>
                            </fieldset>
                            <?php 
    }
    ?>
                    </td></tr></table></fieldset>
        <fieldset>
            <legend><?php 
    echo CONTROL_USER_MAIL_CONTENT;
    ?>
</legend>
            <table border=0 cellpadding=6 cellspacing=0 width=100%><tr><td>
                        <?php 
    echo CONTROL_USER_MAIL_FROM;
    ?>
: <b><?php 
    echo $SPAM_FROM_NAME;
    ?>
</b> &lt;<?php 
    echo $SPAM_FROM;
    ?>
&gt; <a href=<?php 
    echo "" . $ADMIN_PATH . "settings.php?phase=1";
    ?>
><?php 
    echo CONTROL_USER_MAIL_CHANGE;
    ?>
</a><br><br>

                        <?php 
    echo CONTROL_USER_MAIL_SUBJECT;
    ?>
:<br><?php 
    echo nc_admin_input_simple('Subject', '', 60);
    ?>
<br><br>
                        <?php 
    echo nc_admin_checkbox_simple('is_html', 1, NETCAT_MODULE_HTML_MAIL, false, 'is_html');
    ?>
<br />

                        <?php 
    echo nc_admin_textarea(CONTROL_USER_MAIL_BODY, 'Message', '', 1, 1, 'width: 100%; height: 20em; line-height: 1em; ');
    ?>
<br><br>
                        
                        <?php 
    echo nc_admin_checkbox_simple('Attach', 1, CONTROL_USER_MAIL_ADDATTACHMENT, false, 'att');
    ?>
                        
                    </td></tr></table>
        </fieldset>

        <?php 
    /* <div align=right><input class=s type=submit value="<?=CONTROL_USER_MAIL_SEND?>"></div> */
    global $UI_CONFIG;
    $UI_CONFIG->actionButtons[] = array("id" => "submit", "caption" => CONTROL_USER_MAIL_SEND, "action" => "mainView.submitIframeForm()");
    ?>

        <input type=hidden name=phase value=2>
        <input type='submit' class='hidden'>
    </form>
    <?php 
}
Пример #13
0
?>
<br>
                <?
                $user_name=$resAssign->getUsername(FALSE);
                if ($user_name)
                    echo "<b>". htmlReady($user_name) . "</b>";
                else
                    echo "<b>-- "._("keinE Stud.IP NutzerIn eingetragen")." -- &nbsp;</b>";
                if (!$lockedAssign) : ?>
                <br><br>
                    <? if ($user_name)
                        print _("einen anderen Benutzer (NutzerIn oder Einrichtung) eintragen:");
                     else
                        print _("einen Nutzer (Person oder Einrichtung) eintragen:"); ?>
                    <br>
                    <? showSearchForm("search_user", $search_string_search_user, FALSE, TRUE, FALSE, FALSE, FALSE, "up") ?> <br>
                    <?php 
echo _("freie Eingabe zur Belegung:");
?>
<br>
                    <input name="change_schedule_user_free_name" value="<?php 
echo htmlReady($resAssign->getUserFreeName());
?>
" size=40 maxlength="255">
                    <br><?php 
echo _("<b>Beachten Sie:</b> Wenn Sie einen NutzerIn oder eine Einrichtung eintragen, kann diese NutzerIn oder berechtigte Personen die Belegung selbstständig aufheben. Sie können die Belegung aber auch frei eingeben.");
?>
                    <input type ="hidden" name="change_schedule_assign_user_id" value="<? echo $resAssign->getAssignUserId(); ?>">
                    <input type ="hidden" name="change_schedule_repeat_mode" value="<? echo $resAssign->getRepeatMode(); ?>">
                <? endif; ?>
            </td>