Exemplo n.º 1
0
 public function testLoadRolesForPage()
 {
     $app = new Profiles();
     $app->ds->loadMock('roles_definitions', APP_ROOT . 'data/roles_definitions.txt');
     $this->assertTrue($app->checkPage('index/test', 1, 'read'));
     $this->assertFalse($app->checkPage('index/test', 1, 'write'));
 }
Exemplo n.º 2
0
 public function testProfilesManager()
 {
     $_SESSION["admin"] = 0;
     $data = new data_source_mysqli();
     $data->config = self::$config;
     $data->connect("");
     $data->index_field = "definition_id";
     $app = new Profiles();
     $app->ds = $data;
     $this->assertTrue($app->checkObject('profile', 4, 'insert'));
     $this->assertFalse($app->checkObject('users', 5, 'insert'));
 }
Exemplo n.º 3
0
<?php 
// ARK profiles only
include '/class/profile.php';
$pass_profile = new Profiles('ark');
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>ARK Uploads</title>
<link rel="stylesheet" type="text/css" href="ezid.css">
</head>
<body>
<section class="about">
  <h1 hidden>How to:</h1>
  <p>CSV File Only. Must be Pipe delimited and in this order:</p>
  <ol>
    <li>URL</li>
    <li>Who</li>
    <li>What</li>
    <li>When</li>
  </ol>
</section>
<section class="forms">
  <h2 hidden>CSV</h2>
  <ol>
    <li>Choose your file </li>
    <li>Submit</li>
  </ol>
  <form action="<?php 
Exemplo n.º 4
0
Arquivo: index.php Projeto: rair/yacs
     $values .= Skin::table_prefix('yc-grid');
     while ($row = SQL::fetch($result)) {
         $values .= '<tr><td>' . $row['id'] . '</td><td>' . str_replace("\n", BR, $row['value']) . '</td><td>' . Surfer::from_GMT($row['edit_date']) . "</td></tr>\n";
     }
     $values .= "</table>\n";
 }
 // display in a separate panel
 if (trim($values)) {
     $panels[] = array('values', i18n::s('Values'), 'values_panel', $values);
 }
 //
 // script profiles
 //
 $profiles = '';
 include_once $context['path_to_root'] . 'agents/profiles.php';
 if ($rows = Profiles::list_by_hits(0, 50)) {
     // splash message
     $profiles .= '<p>' . i18n::s('You can sort the table below by clicking on column headers.') . "</p>\n";
     // the actual list of events
     $headers = array(i18n::s('Script'), i18n::s('Hits'), i18n::s('Average time'), i18n::s('Minimum time'), i18n::s('Maximum time'), i18n::s('Total time'));
     $profiles .= Skin::table($headers, $rows);
 }
 // display in a separate panel
 if (trim($profiles)) {
     $panels[] = array('performance', i18n::s('Performance'), 'performance_panel', $profiles);
 }
 //
 // display referer information
 //
 $referrals = '';
 include_once $context['path_to_root'] . 'agents/referrals.php';
Exemplo n.º 5
0
Arquivo: index.php Projeto: rair/yacs
     $text .= Skin::table_row(array(SQL::table_name('notifications'), i18n::s('unknown or empty table'), ' ', ' '), $lines++);
 }
 // the php documentation
 if ($row = SQL::table_stat('phpdoc')) {
     $cells = array();
     $cells[] = Skin::build_link('scripts/', SQL::table_name('phpdoc'), 'basic');
     $cells[] = 'center=' . $row[0];
     $cells[] = 'center=' . ($row[1] ? Skin::build_date($row[1]) : '--');
     $cells[] = 'center=' . ($row[2] ? Skin::build_date($row[2]) : '--');
     $text .= Skin::table_row($cells, $lines++);
 } else {
     $text .= Skin::table_row(array(SQL::table_name('phpdoc'), i18n::s('unknown or empty table'), ' ', ' '), $lines++);
 }
 // profiles
 include_once '../agents/profiles.php';
 if ($stats = Profiles::stat()) {
     $cells = array();
     $cells[] = SQL::table_name('profiles');
     $cells[] = 'center=' . $stats['count'];
     $cells[] = 'center=--';
     $cells[] = 'center=--';
     $text .= Skin::table_row($cells, $lines++);
 } else {
     $text .= Skin::table_row(array(SQL::table_name('profiles'), i18n::s('unknown or empty table'), ' ', ' '), $lines++);
 }
 // referrals
 include_once '../agents/referrals.php';
 if ($stats = Referrals::stat()) {
     $cells = array();
     $cells[] = SQL::table_name('referrals');
     $cells[] = 'center=' . $stats['count'];
Exemplo n.º 6
0
<?php

if (!_acl::isAllow('permissions')) {
    die('Access denied');
}
$header = 'Права доступа';
$tpl->Assign('h1', $header);
$ii = count($GLOBALS['IERA_LINKS']);
$GLOBALS['IERA_LINKS'][$ii]['title'] = $header;
$current_id_profile = 0;
if (isset($GLOBALS['REQAR'][1]) && is_numeric($GLOBALS['REQAR'][1])) {
    $current_id_profile = $GLOBALS['REQAR'][1];
}
$Profiles = new Profiles();
$Profiles->SetList();
$profiles_list = $Profiles->list;
$tpl->Assign('profiles_list', $profiles_list);
$Profiles->SetFieldsById($current_id_profile);
$tpl->Assign('current_profile', $Profiles->fields);
$controllers = G::GetControllers($GLOBALS['PATH_contr']);
foreach ($controllers as $val) {
    $list[] = preg_replace('/(?:edit|del|add)$/', '', $val);
}
$tpl->Assign('list', array_unique($list));
$parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_permissions.tpl'));
if ($parsed_res['issuccess'] == true) {
    $tpl_center .= $parsed_res['html'];
}
Exemplo n.º 7
0
<?php

if (!_acl::isAllow('profilesedit')) {
    die('Access denied');
}
if (!isset($GLOBALS['REQAR'][1]) || !is_numeric($GLOBALS['REQAR'][1])) {
    header('Location: ' . $GLOBALS['URL_base'] . '404/');
    exit;
}
$header = 'Редактирование профиля';
$ii = count($GLOBALS['IERA_LINKS']);
$GLOBALS['IERA_LINKS'][$ii]['title'] = 'Профили пользователей';
$GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/profiles/';
$GLOBALS['IERA_LINKS'][$ii]['title'] = $header;
$id = (int) $GLOBALS['REQAR'][1];
$Profiles = new Profiles();
if (isset($_POST['smb'])) {
    $Profiles->Update($_POST);
}
$Profiles->SetFieldsByID($id);
foreach ($Profiles->fields as $key => $value) {
    $_POST[$key] = $value;
}
$parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_profiles_ae.tpl'));
if ($parsed_res['issuccess'] == true) {
    $tpl_center .= $parsed_res['html'];
}
Exemplo n.º 8
0
<?php

if (!_acl::isAllow('profiles')) {
    die('Access denied');
}
$header = 'Профили пользователей';
$tpl->Assign('h1', $header);
$ii = count($GLOBALS['IERA_LINKS']);
$GLOBALS['IERA_LINKS'][$ii]['title'] = $header;
$Profiles = new Profiles();
$Profiles->SetList();
$list = $Profiles->list;
foreach ($list as &$profile) {
    $res = $Profiles->GetUsersByProfileId($profile['id_profile']);
    $profile['users_count'] = is_array($res) ? count($res) : 0;
}
$tpl->Assign('list', $list);
$parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_profiles.tpl'));
if ($parsed_res['issuccess'] == true) {
    $tpl_center .= $parsed_res['html'];
}