示例#1
0
function _moduleContent(&$smarty, $module_name)
{
    include_once "libs/paloSantoGrid.class.php";
    include_once "libs/paloSantoForm.class.php";
    include_once "libs/paloSantoOrganization.class.php";
    //folder path for custom templates
    $local_templates_dir = getWebDirModule($module_name);
    //conexion resource
    $pDB = new paloDB($arrConf['elastix_dsn']["elastix"]);
    global $arrCredentials;
    $action = getAction();
    $content = "";
    switch ($action) {
        case "new_user":
            $content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "view":
            $content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "edit":
            $content = viewFormUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "save_new":
            $content = saveNewUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "save_edit":
            $content = saveEditUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "delete":
            $content = deleteUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "getGroups":
            $content = getGroups($pDB, $arrCredentials);
            break;
        case "getImage":
            $content = getImage($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "reloadAasterisk":
            $content = reloadAasterisk($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
        case "reconstruct_mailbox":
            $content = reconstruct_mailbox($pDB, $arrConf, $arrCredentials);
            break;
            /*case "changes_email_quota":
              $content = changes_email_quota($smarty, $module_name, $pDB, $arrConf, $arrCredentials);
              break;*/
        /*case "changes_email_quota":
          $content = changes_email_quota($smarty, $module_name, $pDB, $arrConf, $arrCredentials);
          break;*/
        default:
            // report
            $content = reportUser($smarty, $module_name, $local_templates_dir, $pDB, $arrConf, $arrCredentials);
            break;
    }
    return $content;
}
示例#2
0
 /**
  * Allow a user to chose the membergroups to send the announcement to.
  * Lets the user select the membergroups that will receive the topic announcement.
  * Accessed by action=announce;sa=selectgroup
  * @uses Announce template announce sub template
  */
 public function action_selectgroup()
 {
     global $context, $topic, $board_info;
     require_once SUBSDIR . '/Membergroups.subs.php';
     require_once SUBSDIR . '/Topic.subs.php';
     // Build a list of groups that can see this board
     $groups = array_merge($board_info['groups'], array(1));
     foreach ($groups as $id => $group) {
         $groups[$id] = (int) $group;
     }
     // Prepare for a group selection list in the template
     $context['groups'] = getGroups($groups);
     // Get the subject of the topic we're about to announce.
     $topic_info = getTopicInfo($topic, 'message');
     $context['topic_subject'] = $topic_info['subject'];
     censorText($context['announce_topic']['subject']);
     // Prepare for the template
     $context['move'] = isset($_REQUEST['move']) ? 1 : 0;
     $context['go_back'] = isset($_REQUEST['goback']) ? 1 : 0;
     $context['sub_template'] = 'announce';
 }
示例#3
0
文件: par.php 项目: DenisMalofeyev/vk
function vk_parse_wall()
{
    $postCount = 150;
    // Сколько постов парсить
    $groups = getGroups();
    // Получаем группы
    $gCount = count($groups);
    // Получаем количество групп
    for ($l = 0; $l < $gCount; $l++) {
        $postsOnGroup = $postCount / $gCount;
        // Узнаем сколько постов парсить из каждоый группы
        $page = file_get_contents(trim($groups[$l]['url']));
        // Получаем страничку
        $mcount = countPostsInGroup($page);
        // Количество постов в группе
        if ($groups[$l]['parsed_count'] < $mcount - 100) {
            $offset = $mcount - $groups[$l]['parsed_count'];
            for ($k = $postsOnGroup; $k > 0; $k = $k - 10) {
                $thisPage = file_get_contents(trim('' . $groups[$l]['url'] . '?offset=' . $offset . ''));
                preg_match_all('/class="cc">(.*)class="links[\\n]*/Us', $thisPage, $firstContent);
                $countCc = count($firstContent);
                echo $countCc;
                for ($h = 0; $h < $countCc; $h++) {
                    preg_match_all('/class="like i"><i><\\/i><b>(.*)<\\/b>[\\n]*/Us', $firstContent[1][$h], $content1);
                    if ($content1[1][0] > 30) {
                        preg_match_all('/<div class="text">(.*)<\\/div>[\\n]*/Us', $firstContent[1][$h], $content);
                        if (isset($content[1][0])) {
                            echo $content[1][0];
                            echo ' - ';
                            echo $content1[1][0];
                            echo ' - ' . $groups[$l]['url'] . '?offset=' . $offset . '';
                            echo '<br />';
                        }
                    }
                }
                $offset = $offset - 10;
            }
        }
    }
}
示例#4
0
文件: edit.php 项目: n4v/openTracker
                <td><?php 
    echo _t("Widget");
    ?>
</td>
                <td><select name="module"><?php 
    echo makefileopts($widgets, $db->widget_module);
    ?>
</select></td>
            </tr>
            <tr>
                <td><?php 
    echo _t("Visible for");
    ?>
</td>
                <td><select name="group"><?php 
    echo getGroups($db->widget_group);
    ?>
</select> <?php 
    echo _t("and above");
    ?>
</td>
            </tr>
            <tr>
                <td><input type="submit" name="install" value="<?php 
    echo _t("Save");
    ?>
"></td>
            </tr>
        </table>
    </form>
//birthday
//image
?>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php 
require_once '../Templates/session-start.req-inc.php';
include '../Functions/dbconnect.php';
include '../Functions/Add-functions.php';
include '../Functions/utils-function.php';
include '../Functions/upload-function.php';
$results = getGroups();
if (isPostRequest()) {
    $address_group_id = filter_input(INPUT_POST, 'address_group_id');
    $fullname = filter_input(INPUT_POST, 'fullname');
    $email = filter_input(INPUT_POST, 'email');
    $address = filter_input(INPUT_POST, 'address');
    $phone = filter_input(INPUT_POST, 'phone');
    $website = filter_input(INPUT_POST, 'website');
    $birthday = filter_input(INPUT_POST, 'birthday');
    $isAdded = addToBook();
    if ($isAdded === false) {
        $message = 'Data was not added, please make sure you have entered all required data and that the data is valid<br>';
    } else {
        $message = 'Data was added<br>';
    }
}
示例#6
0
} else {
    $password = '';
}
if (isset($_POST['confirm'])) {
    $confirm = $_POST['confirm'];
} else {
    $confirm = '';
}
if (isset($_POST['user_group_id'])) {
    $user_group_id = $_POST['user_group_id'];
} elseif (!empty($user_info)) {
    $user_group_id = $user_info['group_id'];
} else {
    $user_group_id = '';
}
$user_groups = getGroups();
if (isset($_POST['status'])) {
    $status = $_POST['status'];
} elseif (!empty($user_info)) {
    $status = $user_info['status'];
} else {
    $status = 0;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $action = $_POST['action'];
    $user_id = $_POST['user_id'];
    $username = $_POST['username'];
    $email = $_POST['email'];
    $password = $_POST['password'];
    $confirm = $_POST['confirm'];
    $user_group = $_POST['user_group_id'];
示例#7
0
文件: edit.php 项目: n4v/openTracker
    echo _t("Active");
    ?>
</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td width="150px">
                                    <?php 
    echo _t("Group");
    ?>
 :
                                </td>
                                <td>
                                    <select name="group"><?php 
    echo getGroups($db->user_group, true);
    ?>
</select>
                                </td>
                            </tr>
                            <tr>
                                <td width="150px">
                                    <?php 
    echo _t("Uploader");
    ?>
 :
                                </td>
                                <td>
                                    <input type="checkbox" name="uploader" <?php 
    echo $db->user_uploader == "1" ? "CHECKED" : "";
    ?>
示例#8
0
                </td>
                <td>
                    <?php 
    echo $this->addon;
    ?>
                </td>
            </tr>
            <tr>
                <td>
                    <?php 
    echo _t("Visible for");
    ?>
                </td>
                <td>
                    <select name="group"><?php 
    echo getGroups($db->addon_group);
    ?>
</select> <?php 
    echo _t("and above");
    ?>
                </td>
            </tr>
            <tr>
                <td>
                    <input type="submit" name="save" value="<?php 
    echo _t("Save");
    ?>
">
                </td>
            </tr>
        </table>
示例#9
0
<?php

// Get list of all users or one in particualr if the id is given
include_once '../include/headers.php';
include_once '../include/dbutils.php';
include_once '../include/main.php';
include_once 'domain/groups.php';
db_connect();
$expand = isset($_GET['expand']) ? $_GET['expand'] : null;
if (isset($_GET['id'])) {
    $value = getGroup($_GET['id'], $expand);
} else {
    $value = getGroups($expand);
}
//return JSON array
exit(json_encode($value));
示例#10
0
if ($upcomingGroupEvents->have_posts()) {
    while ($upcomingGroupEvents->have_posts()) {
        $upcomingGroupEvents->the_post();
        ?>

			<?php 
        if ($counter == 0) {
            echo "<li class='col-sm-4 active'>";
        } else {
            echo "<li class='col-sm-4'>";
        }
        ?>
			<span class='state-indicator'></span>
			<h3>
				<?php 
        $groups = getGroups($post->ID);
        ?>
				<?php 
        echo $groups->post_title . ":";
        ?>
				<br>
				<a href="<?php 
        echo the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a>
			</h3>
			<small>
				<?php 
示例#11
0
require_once 'Helper/PHPExcel/IOFactory.php';
$relations = array();
$definitions = array();
$additionalData = array();
$file = __DIR__ . '/data/US Data v1.1.xlsx';
if (!file_exists($file)) {
    exit("File ' . {$file} . ' first not found.\n");
}
$objPHPExcel = PHPExcel_IOFactory::load($file);
$relations = getSheetData($objPHPExcel, 0);
$definitions = getSheetData($objPHPExcel, 1);
$additionalData = getSheetData($objPHPExcel, 2);
$returns = array();
if (count($relations) > 0 && count($definitions) > 0 && count($additionalData)) {
    $groups = getGroups($relations);
    $nodes = getNodes($relations, $definitions, $groups);
    /*echo '<pre>';
      var_dump($nodes);
      echo '</pre>';
      die;*/
    $links = getLinks($relations, $nodes);
    $additionalNodesData = getAdditionalNodesData($additionalData, $nodes);
    $returns = array('nodes' => $nodes, 'links' => $links, 'groups' => $groups, 'additionalNodesData' => $additionalNodesData);
    echo json_encode($returns);
}
// helper functions
function getSheetData($objPHPExcel, $number = 0)
{
    $result = array();
    $objPHPExcel->setActiveSheetIndex($number);
示例#12
0
                <td><input type="text" name="name" value="<?php 
    echo $db->name;
    ?>
" size="40"></td>
            </tr>
            <tr>
                <td>Category</td>
                <td><select name="category"><?php 
    echo getForumCategory($db->category);
    ?>
</select></td>
            </tr>
            <tr>
                <td>Group</td>
                <td><select name="group"><?php 
    echo getGroups($db->group);
    ?>
</select></td>
            </tr>
            <tr>
                <td valign="top">Description</td>
                <td><textarea name="description" rows="5" cols="31"><?php 
    echo $db->description;
    ?>
</textarea></td>
            </tr>
            <tr>
                <td><input type="submit" value="Save forum" name="save" /></td>
            </tr>
        </table>
    </form>
示例#13
0
    ?>
)</option><?php 
    echo getGroups($db->upgradeto);
    ?>
</select></td>
            </tr>
            <tr>
                <td width="100px"><?php 
    echo _t("Downgrade to");
    ?>
:</td>
                <td><select name="downgradeto"><option value="0">(<?php 
    echo _t("Choose");
    ?>
)</option><?php 
    echo getGroups($db->downgradeto);
    ?>
</select></td>
            </tr>
            <tr>
                <td><?php 
    echo _t("Minimum Upload");
    ?>
:</td>
                <td><input name="minupload" type="text" value="<?php 
    echo $db->minupload;
    ?>
" size="25"></td>
            </tr>
            <tr>
                <td><?php 
示例#14
0
function setCurrentGroupId()
{
    global $cmd;
    if (!isset($_GET['groupid']) && !isset($_SESSION['groupid'])) {
        if (php_uname("s") != "Darwin") {
            $profiles = $cmd->bmonitor->getAllGroupsHost();
        } else {
            $groups = getGroups();
            foreach ($groups as $p) {
                $profiles[] = array('name' => $p['name'], 'groupid' => $p['groupid']);
            }
        }
        foreach ($profiles as $p => $value) {
            $_SESSION['profile'] = $value['name'];
            $_SESSION['groupid'] = $value['groupid'];
        }
    } else {
        if (isset($_GET['groupid'])) {
            $_SESSION['profile'] = $_GET['profile'];
            $_SESSION['groupid'] = $_GET['groupid'];
        }
    }
}
示例#15
0
    getTasks();
} elseif ($_POST["action"] == "add_user") {
    $response['action'] = 'get_users';
    userAdd();
    getUsers();
} elseif ($_POST["action"] == "remove_users") {
    $response['action'] = 'get_users';
    usersRemove();
    getUsers();
} elseif ($_POST["action"] == "get_complete_tasks") {
    $response['action'] = 'get_complete_tasks';
    getCompleteTasks();
} elseif ($_POST["action"] == "get_groups") {
    $response['action'] = 'get_groups';
    getGroups();
} elseif ($_POST["action"] == "add_group") {
    $response['action'] = 'get_tasks';
    groupAdd();
    getGroups();
    getTasks();
} elseif ($_POST["action"] == "group_remove") {
    $response['action'] = 'get_tasks';
    groupRemove();
    getGroups();
    getTasks();
}
/*
if(defined('JSON_NUMERIC_CHECK'))
	echo json_encode($response, JSON_NUMERIC_CHECK);
else*/
echo json_encode($response);
示例#16
0
    </div><!--/.navbar-header -->
    <p class="weekSelector-text">Your Picks for <?php 
echo "{$this_season_year} {$this_season_type} Week {$this_week}";
?>
</p>
    <div id="navbar2" class="navbar-collapse collapse weekSelector">
     <ul class="nav navbar-nav weekSelector">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php 
echo getGroupName($db, $this_group_id);
?>
 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li class="dropdown-header">Groups</li>
            <?php 
$groups = getGroups($db, $this_user_id);
foreach ($groups as $group) {
    echo '<li><a href="' . $THIS_PAGE . '?group_id=' . $group['group_id'] . '&season_year=' . $this_season_year . '&season_type=' . $this_season_type . '&week=' . $this_week . '">' . $group['group_name'] . '</a></li>';
}
?>
      
          </ul>
        </li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php 
echo $this_season_year;
?>
 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li class="dropdown-header">Season Years</li>
            <?php 
示例#17
0
 if ($ldapSet['ldapServer'][0] != 1) {
     echo "<h4>Enable LDAP in settings first !</h4>\n";
     echo "<input type='submit' name='back' value='Ok'>\n";
     $action = '';
     break;
 }
 $found = array();
 $res = getLdapUsers($found);
 if ($res == 0) {
     echo "<h4>No entries found - test LDAP settings !</h4>\n";
     echo "<input type='submit' name='back' value='Ok'>\n";
     $action = '';
     break;
 } else {
     $groups = array();
     getGroups($groups);
 }
 checkLdapUsers($found);
 // check if importable
 echo "<div class='sValue'>Import to group <select name='ldapgroup'>\n";
 foreach ($groups as $id => $name) {
     echo "<option value={$id}>{$name}</option>\n";
 }
 echo "</select></div><br><br>\n";
 //echo '<div class="resultBox">'."\n";
 echo "<table>\n                  <tr><th>UID</th><th>Full Name</th><th>Email</th></tr>\n";
 foreach ($found as $u => $n) {
     if (!isset($found[$u]['flag'])) {
         // put all info into encoded string
         $v = urlencode($u . '|' . $found[$u]['rn'] . '|' . $found[$u]['ml']);
         echo "<tr><td><input type='checkbox' name='ldapsel[]' value={$v}>";
示例#18
0
 case 40:
     //发文件消息
     $filePath = "./resource/up/a.rar";
     $from = 'admin';
     $target_type = "users";
     $target = array("zhangsan", "lisi");
     $filename = "a.rar";
     $length = 10;
     //时长
     $ext['a'] = "a";
     $ext['b'] = "b";
     var_dump(sendFile($filePath, $from = "admin", $target_type, $target, $filename, $length, $ext));
     break;
 case 41:
     //获取app中的所有群组-----不分页(默认返回10个)
     var_dump(getGroups());
     break;
 case 42:
     ////获取app中的所有群组--------分页
     $cursor = readCursor("groupfile.txt");
     var_dump($cursor);
     var_dump(getGroupsForPage(2, $cursor));
     break;
 case 43:
     //获取一个或多个群组的详情
     $group_ids = array("1445830526109", "1445833238210");
     var_dump(getGroupDetail($group_ids));
     break;
 case 44:
     //创建一个群组
     $options['groupname'] = "group001";
示例#19
0
 /** @return Fixture */
 public function subset()
 {
     //COPY:ALL
     return new SubsetFixture($this->app . getGroups());
     //COPY:ALL
 }
示例#20
0
文件: login.php 项目: r0the/paedawan
// Jetzt können wir also die Funktion "password_verify" in jedem Fall verwenden:
if (!password_verify(trim($_POST['passwort']), $hashedPassword)) {
    show_login(trim($_POST['username']), 'Passwort falsch');
    exit;
}
// else:
// Registrierung der Daten in der Session und
// Weiterleitung zur geschützten Startseite
session_start();
session_unset();
session_regenerate_id(true);
if (isset($_POST['register_ip']) && $_POST['register_ip']) {
    $_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
}
$_SESSION['username'] = $_POST['username'];
$_SESSION['groups'] = getGroups($_POST['username']);
$_SESSION['last_action'] = date('U');
$target = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/index.php';
header('Location: ' . $target, true, $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1' ? 303 : 302);
exit;
// benötigte Funktionen
function getHashedPassword($username)
{
    $arRows = file(PASSWORD_FILE);
    unset($csv);
    // Speicher sparen
    foreach ($arRows as $row) {
        $row = trim($row);
        // Manche geben gerne Leerzeichen ein...
        if ($row && '#' != $row[0] && strpos($row, ':')) {
            //Ausschließen von Kommentaren und Leerzeilen sowie Zeilen ohne Trenner
示例#21
0
     $query_insert_models = "  INSERT INTO catalog_models (`id`, `name`, `group`)\r\n                                      VALUES" . $models_sql . "ON DUPLICATE KEY UPDATE\r\n                                          `id` = VALUES(`id`), `name` = VALUES(`name`), `group` = VALUES(`group`)";
     $query_insert_modifications = "  INSERT INTO catalog_modifications (`id`, `model`, `name`, `start_year`, `end_year`)\r\n                                      VALUES" . $modifications_sql . "ON DUPLICATE KEY UPDATE\r\n                                          `id` = VALUES(`id`), `model` = VALUES(`model`), `name` = VALUES(`name`), `start_year` = VALUES(`start_year`), `end_year` = VALUES(`end_year`)";
     $db->query($query_insert_categories);
     $db->query($query_insert_marks);
     $db->query($query_insert_groups);
     $db->query($query_insert_models);
     $db->query($query_insert_modifications);
 }
 if ($_model) {
     $c["list"] = getModifications($_model);
     $c["link"] = "modification";
 } elseif ($_group) {
     $c["list"] = getModels($_group);
     $c["link"] = "model";
 } elseif ($_mark) {
     $c["list"] = getGroups($_mark, $_cat);
     $c["link"] = "group";
 } elseif ($_cat) {
     $cat_children = getCategories($_cat);
     if (count($cat_children) > 0) {
         $c["list"] = $cat_children;
         $c["link"] = "cat";
     } else {
         $c["list"] = getMarks();
         $c["link"] = "mark";
     }
 } else {
     $c["list"] = $categories;
     $c["link"] = "cat";
 }
 $c["uri"] = $_SERVER['REQUEST_URI'];
示例#22
0
    curl_setopt($ch, CURLOPT_TIMEOUT, 10);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 1);
    $result = curl_exec($ch);
    //echo var_export($result);
    //$result = json_decode($result);
    curl_close($ch);
    return $result;
}
header("Content-Type: application/json;charset=utf-8");
$rt = array('result' => false, 'error' => -1);
$logger->info('client/services ' . $_SERVER['QUERY_STRING']);
$action = getParam('action', '');
switch ($action) {
    case 'groups':
        $rt['value'] = getGroups();
        $rt['result'] = true;
        $rt['error'] = 0;
        break;
    case 'site':
        $gp = getParam('gp', '');
        $sitegp = $config['groups'][$gp];
        if ($sitegp != null) {
            $client = new VersionSwitch($sitegp['url'], $sitegp['key']);
            $rt = $client->version_list();
        }
        break;
    case 'switch':
        $gp = getParam('gp', '');
        $site = getParam('site', '');
        $ver = getParam('ver', '');
示例#23
0
            $host .= ":" . $_SERVER['SERVER_PORT'];
        }
        $httpsUrl = $host . $_SERVER['REQUEST_URI'];
        header('Location: ' . $httpsUrl);
        exit;
    }
}
$users = getUsers();
$currentUserInfo = getCurrentUserInfo($users);
// Cache buster
$git = __DIR__ . '/.git';
$cacheBuster = Directus\Util\Git::getCloneHash($git);
$tableSchema = TableSchema::getAllSchemas($currentUserInfo['group']['id'], $cacheBuster);
// $tabPrivileges = getTabPrivileges(($currentUserInfo['group']['id']));
$groupId = $currentUserInfo['group']['id'];
$groups = getGroups();
$currentUserGroup = array();
if (isset($groups['rows']) && count($groups['rows'] > 0)) {
    foreach ($groups['rows'] as $group) {
        if ($group['id'] === $groupId) {
            $currentUserGroup = $group;
            break;
        }
    }
}
$statusMapping = array('active_num' => STATUS_ACTIVE_NUM, 'deleted_num' => STATUS_DELETED_NUM, 'status_name' => STATUS_COLUMN_NAME);
$statusMapping['mapping'] = $config['statusMapping'];
$data = array('cacheBuster' => $cacheBuster, 'nonces' => getNonces(), 'storage_adapters' => getStorageAdapters(), 'path' => DIRECTUS_PATH, 'page' => '#tables', 'tables' => parseTables($tableSchema), 'preferences' => parsePreferences($tableSchema), 'users' => $users, 'groups' => $groups, 'settings' => getSettings(), 'active_files' => getActiveFiles(), 'authenticatedUser' => $authenticatedUser, 'extensions' => getExtensions($currentUserGroup), 'privileges' => getPrivileges($groupId), 'ui' => getUI(), 'listViews' => getListViews(), 'messages' => getInbox(), 'bookmarks' => getBookmarks(), 'extendedUserColumns' => getExtendedUserColumns($tableSchema), 'statusMapping' => $statusMapping);
$templateVars = array('cacheBuster' => $cacheBuster, 'data' => json_encode($data), 'path' => DIRECTUS_PATH, 'customFooterHTML' => getCusomFooterHTML(), 'cssFilePath' => getCSSFilePath(), 'cms_color' => '#89c33d');
if (isset($data['settings']) && isset($data['settings'][0]) && isset($data['settings'][0]['cms_color'])) {
    $templateVars['cms_color'] = $data['settings'][0]['cms_color'];
示例#24
0
    $sort = 'name';
}
if (isset($_GET['order'])) {
    $order = $_GET['order'];
} else {
    $order = 'ASC';
}
if (isset($_GET['page'])) {
    $page = $_GET['page'];
} else {
    $page = 1;
}
$numrows = 20;
$data = array('sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $numrows, 'limit' => $numrows);
$total_group = getTotalGroups();
$user_groups = getGroups($data);
$pagination = new Pagination();
$pagination->total = $total_group;
$pagination->page = $page;
$pagination->limit = $numrows;
$pagination->url = "user_group/page{page}.html";
$pagination = $pagination->render();
$url = '';
if ($order == 'ASC') {
    $url .= '/DESC';
} else {
    $url .= '/ASC';
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['selected'])) {
    foreach ($_POST['selected'] as $group_id) {
        $delete_query = deleteGroup($group_id);
示例#25
0
 $assessmentsoutput .= "<script type=\"text/javascript\">\n                        <!-- \n                            var strnogroup='" . $clang->gT("There are no groups available.", "js") . "';\n                        --></script>\n";
 $assessmentsoutput .= "<div class='menubar'>\n" . "\t<div class='menubar-title'>\n" . "<strong>" . $clang->gT("Assessments") . "</strong>\n";
 $assessmentsoutput .= "\t</div>\n" . "\t<div class='menubar-main'>\n" . "<div class='menubar-left'>\n" . "\t<a href=\"#\" onclick=\"window.open('{$scriptname}?sid={$surveyid}', '_top')\" title='" . $clang->gTview("Return to survey administration") . "'>" . "<img name='Administration' src='{$imagefiles}/home.png' alt='" . $clang->gT("Return to survey administration") . "' /></a>\n" . "\t<img src='{$imagefiles}/blank.gif' alt='' width='11'  />\n" . "\t<img src='{$imagefiles}/seperator.gif' alt='' />\n";
 if ($surveyinfo['assessments'] != 'Y') {
     $assessmentsoutput .= '<span style="font-size:11px;">' . sprintf($clang->gT("Notice: Assessment mode for this survey is not activated. You can activate it in the %s survey settings %s (tab 'Notification & data management')."), '<a href="admin.php?action=editsurvey&amp;sid=' . $surveyid . '">', '</a>') . '</span>';
 }
 $assessmentsoutput .= "</div>\n" . "\t</div>\n" . "</div>\n";
 $assessmentsoutput .= "<p style='margin:0;font-size:1px;line-height:1px;height:1px;'>&nbsp;</p>";
 //CSS Firefox 2 transition fix
 if ($surveyid == "") {
     $assessmentsoutput .= $clang->gT("No SID Provided");
     exit;
 }
 $assessments = getAssessments($surveyid);
 //$assessmentsoutput.= "<pre>";print_r($assessments);echo "</pre>";
 $groups = getGroups($surveyid);
 $groupselect = "<select name='gid' id='gid'>\n";
 foreach ($groups as $group) {
     $groupselect .= "<option value='" . $group['gid'] . "'>" . $group['group_name'] . "</option>\n";
 }
 $groupselect .= "</select>\n";
 $headings = array($clang->gT("Scope"), $clang->gT("Question group"), $clang->gT("Minimum"), $clang->gT("Maximum"));
 $actiontitle = $clang->gT("Add");
 $actionvalue = "assessmentadd";
 $thisid = "";
 if ($action == "assessmentedit") {
     $query = "SELECT * FROM {$dbprefix}assessments WHERE id=" . sanitize_int($_POST['id']) . " and language='{$baselang}'";
     $results = db_execute_assoc($query);
     while ($row = $results->FetchRow()) {
         $editdata = $row;
     }
示例#26
0
if (isset($_GET['class'])) {
    $sortByClass = $_GET['class'];
}
$school = getSchool($mysqli, $id);
$schoolName = $school["name"];
$schoolLocation = $school["location"];
$user = getMember($mysqli, $_SESSION['user_id']);
$members = getMembersInSchool($mysqli, $id);
if ($sortByClass == "true") {
    $messages = getBoardMessagesWithGraduationYear($mysqli, $id, $user['graduationYear'], 'school');
} else {
    if ($sortByClass == "false") {
        $messages = getBoardMessages($mysqli, $id, 'school');
    }
}
$groups = getGroups($mysqli, $id);
?>

<!DOCTYPE html>
<html>
	<head>
		<title>After School</title>
        <meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="css/main.css" />
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>  
		<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-7s5uDGW3AHqw6xtJmNNtr+OBRJUlgkNJEo78P4b0yRw= sha512-nNo+yCHEyn0smMxSswnf/OnX6/KwJuZTlNZBjauKhTK0c+zT+q5JOCx0UFhXQ6rJR9jg6Es8gPuD2uZcYDLqSw==" crossorigin="anonymous">
		<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha256-KXn5puMvxCw+dAYznun+drMdG1IFl3agK0p/pqT9KAo= sha512-2e8qq0ETcfWRI4HJBzQiA3UoyFk6tbNyG+qSaIBZLyW9Xf3sWZHN/lxe9fTh1U45DpPf07yj94KsUHHWe4Yk1A==" crossorigin="anonymous"></script>
		<script src="js/schoolAjax.js"></script> 
		<script src="js/board.js"></script>
示例#27
0
function getMultiGroups($str)
{
    $tok = explode("MULTI_GROUP", $str);
    return getGroups($tok, "multi");
}
示例#28
0
if ($forceHttps) {
    $isHttpsFallbackFn = function () {
        return isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
    };
    $isHttpsFn = isset($config['HTTP']['isHttpsFn']) ? $config['HTTP']['isHttpsFn'] : $isHttpsFallbackFn;
    if (!$isHttpsFn()) {
        $host = 'https://' . $_SERVER['SERVER_NAME'];
        if ('80' != $_SERVER['SERVER_PORT']) {
            $host .= ":" . $_SERVER['SERVER_PORT'];
        }
        $httpsUrl = $host . $_SERVER['REQUEST_URI'];
        header('Location: ' . $httpsUrl);
        exit;
    }
}
$users = getUsers();
$currentUserInfo = getCurrentUserInfo($users);
// Cache buster
$git = __DIR__ . '/.git';
$cacheBuster = Directus\Util\Git::getCloneHash($git);
$tableSchema = TableSchema::getAllSchemas($currentUserInfo['group']['id'], $cacheBuster);
$tabPrivileges = getTabPrivileges($currentUserInfo['group']['id']);
$groupId = $currentUserInfo['group']['id'];
$statusMapping = array('active_num' => STATUS_ACTIVE_NUM, 'deleted_num' => STATUS_DELETED_NUM, 'status_name' => STATUS_COLUMN_NAME);
$statusMapping['mapping'] = $config['statusMapping'];
$data = array('cacheBuster' => $cacheBuster, 'nonces' => getNonces(), 'storage_adapters' => getStorageAdapters(), 'path' => DIRECTUS_PATH, 'page' => '#tables', 'tables' => parseTables($tableSchema), 'preferences' => parsePreferences($tableSchema), 'users' => $users, 'groups' => getGroups(), 'settings' => getSettings(), 'active_files' => getActiveFiles(), 'authenticatedUser' => $authenticatedUser, 'tab_privileges' => $tabPrivileges, 'extensions' => getExtensions($tabPrivileges), 'privileges' => getPrivileges($groupId), 'ui' => getUI(), 'listViews' => getListViews(), 'messages' => getInbox(), 'bookmarks' => getBookmarks(), 'extendedUserColumns' => getExtendedUserColumns($tableSchema), 'statusMapping' => $statusMapping);
$templateVars = array('cacheBuster' => $cacheBuster, 'data' => json_encode($data), 'path' => DIRECTUS_PATH, 'customFooterHTML' => getCusomFooterHTML(), 'cssFilePath' => getCSSFilePath(), 'cms_color' => '#89c33d');
if (isset($data['settings']) && isset($data['settings'][0]) && isset($data['settings'][0]['cms_color'])) {
    $templateVars['cms_color'] = $data['settings'][0]['cms_color'];
}
echo template(file_get_contents('main.html'), $templateVars);
示例#29
0
            <td width = "100px"><?php 
echo _t("Upgrade to");
?>
:</td>
            <td><select name="upgradeto"><option value="0">(Choose)</option><?php 
echo getGroups();
?>
</select></td>
        </tr>
        <tr>
            <td width="100px"><?php 
echo _t("Downgrade to");
?>
:</td>
            <td><select name = "downgradeto"><option value = "0">(Choose)</option><?php 
echo getGroups();
?>
</select></td>
        </tr>
        <tr>
            <td><?php 
echo _t("Minimum Upload");
?>
:</td>
            <td><input name="minupload" type="text" size="25"><br />(This data counts i kb)</td>
        </tr>
        <tr>
            <td><?php 
echo _t("Minimum Ratio");
?>
:</td>
示例#30
0
        <input type="hidden" name="secure_input" value="<?php echo $_SESSION['secure_token_last'] ?>">
        <table>
            <tr>
                <td width="120px">
                    <?php echo _t("Addon") ?>
                </td>
                <td>
                    <?php echo $this->addon ?>
                </td>
            </tr>
            <tr>
                <td>
                    <?php echo _t("Visible for") ?>
                </td>
                <td>
                    <select name="group"><?php echo getGroups() ?></select> <?php echo _t("and above") ?>
                </td>
            </tr>
            <tr>
                <td>
                    <input type="submit" name="install" value="<?php echo _t("Install") ?>">
                </td>
            </tr>
        </table>
    </form>
    <?
} Catch (Exception $e) {
    echo error(_t($e->getMessage()));
}
?>