function base()
 {
     $this->config = D('Group')->getConfig();
     //系统的配置文件
     $this->siteTitle = getSiteTitle();
     $this->assign('config', $this->config);
     $this->api->space_changeCount('group', D('Member')->memberCount($this->uid));
 }
Exemplo n.º 2
0
function makeSiteTitle()
{
    if (URI::checkPage() == 'Home') {
        return strip_tags(getSiteTitle());
    } elseif (URI::checkPage() == '404') {
        return strip_tags('404 - Not Found' . ' - ' . getSiteTitle());
    } elseif (URI::checkPage() == 'Single' || URI::checkPage() == 'Page') {
        return strip_tags(Posts::getPostTitleById(URI::getParams_single()['id'])) . ' - ' . getSiteTitle();
    } elseif (URI::checkPage() == 'news.php') {
        return strip_tags('News Archive' . ' - ' . getSiteTitle());
    } elseif (URI::checkPage() == 'search.php') {
        return strip_tags('Search' . ' - ' . getSiteTitle());
    } elseif (URI::checkPage() == 'docs.php') {
        return strip_tags('Documentation' . ' - ' . getSiteTitle());
    } else {
        return getSiteTitle();
    }
}
Exemplo n.º 3
0
function showPage($META, $page)
{
    if ($page < 0) {
        $page = 0;
    }
    if ($page * NUM_PER_PAGE >= count($META)) {
        $page = 0;
    }
    showHeader(getSiteTitle());
    $values = array_values($META);
    $keys = array_keys($META);
    for ($num = $page * NUM_PER_PAGE; $num < $page * NUM_PER_PAGE + NUM_PER_PAGE && count($values) > $num; ++$num) {
        showPostContent($values[$num][1], getBaseUrl() . $keys[$num], $values[$num][0], $values[$num][2], $values[$num][3], true);
    }
    showPagination($META, getBaseUrl() . "p/", $page + 1, $page >= 1, ($page + 1) * NUM_PER_PAGE < count($META), array());
    showFooter();
    return true;
}
Exemplo n.º 4
0
function getConfEmailTemplateVars($user_id)
{
    $user = Users::getUserById($user_id);
    $values = ['{username}' => $user['username'], '{email}' => $user['user_email'], '{site_title}' => getSiteTitle(), '{site_url}' => SITE_DOMAIN, '{activate}' => $user['activate']];
    return $values;
}
Exemplo n.º 5
0
     if ($arSelectFieldsMap['PHONE']) {
         $row->AddInputField("PHONE", false);
     }
     if ($arSelectFieldsMap['SCHEDULE']) {
         $row->AddInputField("SCHEDULE", false);
     }
     if ($arSelectFieldsMap['EMAIL']) {
         $row->AddInputField("EMAIL", false);
     }
     if ($arSelectFieldsMap['IMAGE_ID'] && !$bExport) {
         $row->AddField("IMAGE_ID", CFile::ShowImage($arRes['IMAGE_ID'], 100, 100, "border=0", "", true));
     }
 } else {
     $row->AddInputField("SORT", array("size" => "3"));
     if ($arSelectFieldsMap['SITE_ID']) {
         $row->AddViewField("SITE_ID", getSiteTitle($arRes['SITE_ID']));
     }
     if ($arSelectFieldsMap['TITLE']) {
         $row->AddInputField("TITLE");
     }
     if ($arSelectFieldsMap['ACTIVE']) {
         $row->AddCheckField("ACTIVE");
     }
     if ($arSelectFieldsMap['ISSUING_CENTER']) {
         $row->AddCheckField("ISSUING_CENTER");
     }
     if ($arSelectFieldsMap['SHIPPING_CENTER']) {
         $row->AddCheckField("SHIPPING_CENTER");
     }
     if ($arSelectFieldsMap['ADDRESS']) {
         $row->AddInputField("ADDRESS", array("size" => 30));
Exemplo n.º 6
0
 protected function base()
 {
     $class = $this->mainNavClass();
     $this->assign($class);
     $this->assign('need_login', 1);
     // 系统的配置文件
     $this->config = model('Xdata')->lget('group');
     $this->assign('config', $this->config);
     $this->siteTitle = getSiteTitle();
     $this->assign('all_my_app', D('Group')->getAllMyGroup($this->mid));
 }
while ($arDOCUMENT = $dbResultList->NavNext(true, "f_")) {
    $bAllowForEdit = true;
    $strForAction = "EDIT";
    $contractorTitle = '';
    $row =& $lAdmin->AddRow($f_ID, $arDOCUMENT);
    $row->AddField("ID", $f_ID);
    $f_DOC_TYPE = GetMessage("CAT_DOC_" . $f_DOC_TYPE);
    if ($f_STATUS == "Y") {
        $strForAction = "VIEW";
        $bAllowForEdit = false;
    }
    $f_STATUS = GetMessage("CAT_DOC_EXECUTION_" . $f_STATUS);
    if (intval($f_CONTRACTOR_ID) > 0) {
        $contractorTitle = '<a href="/bitrix/admin/cat_contractor_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $f_CONTRACTOR_ID . '">' . htmlspecialcharsbx(getContractorTitle($f_CONTRACTOR_ID)) . '</a>';
    }
    $f_SITE_ID = getSiteTitle($f_SITE_ID);
    $strCreatedBy = '';
    $strModifiedBy = '';
    $f_CREATED_BY = intval($f_CREATED_BY);
    if ($f_CREATED_BY > 0) {
        if (!array_key_exists($f_CREATED_BY, $arUserList)) {
            $rsUsers = CUser::GetList($_REQUEST["by2"] = 'ID', $_REQUEST["order2"] = 'ASC', array('ID_EQUAL_EXACT' => $f_CREATED_BY), array('FIELDS' => array('ID', 'LOGIN', 'NAME', 'LAST_NAME')));
            if ($arOneUser = $rsUsers->Fetch()) {
                $arOneUser['ID'] = intval($arOneUser['ID']);
                $arUserList[$arOneUser['ID']] = CUser::FormatName($strNameFormat, $arOneUser);
            }
        }
        if (isset($arUserList[$f_CREATED_BY])) {
            $strCreatedBy = '<a href="/bitrix/admin/user_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $f_CREATED_BY . '">' . $arUserList[$f_CREATED_BY] . '</a>';
        }
    }