当前位置: 首页>>代码示例>>PHP>>正文


PHP langExt函数代码示例

本文整理汇总了PHP中langExt函数的典型用法代码示例。如果您正苦于以下问题:PHP langExt函数的具体用法?PHP langExt怎么用?PHP langExt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了langExt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: drawEventForm

function drawEventForm()
{
    global $page;
    $f = new form('cal_events', @$_GET['id'], $page['title']);
    if (url_id()) {
        $f->set_title_prefix(drawHeader(false, ' '));
    }
    if ($page['is_admin']) {
        $f->set_field(array('name' => 'created_user', 'class' => 'admin', 'type' => 'select', 'sql' => 'SELECT id, CONCAT_WS(", ", lastname, firstname) FROM users WHERE is_active = 1 ORDER BY lastname, firstname', 'default' => $_SESSION['user_id'], 'required' => true, 'label' => getString('posted_by')));
    }
    $f->set_field(array('name' => 'title' . langExt(), 'label' => getString('title'), 'type' => 'text'));
    $f->set_field(array('name' => 'start_date', 'label' => getString('start_date'), 'type' => 'datetime', 'required' => true));
    $f->set_field(array('name' => 'end_date', 'label' => getString('end_date'), 'type' => 'datetime', 'required' => true));
    $f->set_field(array('name' => 'type_id', 'type' => 'select', 'sql' => 'SELECT id, description' . langExt() . ' FROM cal_events_types ORDER BY description', 'label' => getString('category'), 'required' => 'true'));
    $f->set_field(array('name' => 'description' . langExt(), 'label' => getString('description'), 'type' => 'textarea', 'class' => 'tinymce'));
    langUnsetFields($f, 'title,description');
    formAddChannels($f, 'cal_events', 'event_id');
    $f->set_order('created_user,title, start_date, end_date, type_id, description, channels');
    langTranslateCheckbox($f, url_id());
    return $f->draw(false, false);
}
开发者ID:Rhenan,项目名称:intranet-1,代码行数:21,代码来源:include.php

示例2: db_query

<?php

$clips = db_query('SELECT c.id, c.title' . langExt() . ' title FROM press_clips c ' . getChannelsWhere('press_clips', 'c', 'clip_id') . ' ORDER BY c.pub_date DESC', 4);
if (db_found($clips)) {
    while ($c = db_fetch($clips)) {
        $return .= '<tr><td colspan="2"><a href="/' . $m['folder'] . '/clip.php?id=' . $c['id'] . '">' . format_string($c['title'], 40) . '</a></td></tr>';
    }
} else {
    $return .= '<tr><td colspan="2" class="empty">No clips have been added.</td></tr>';
}
开发者ID:Rhenan,项目名称:intranet-1,代码行数:10,代码来源:pallet.php

示例3: getString

echo $r['description'];
?>
</td>
	</tr>
	<?php 
if (getOption('channels')) {
    ?>
	<tr>
		<td class="left"><?php 
    echo getString('channels_label');
    ?>
</td>
		<td>
			<?php 
    $channels = db_query('SELECT
				c.title' . langExt() . ' title
			FROM press_clips_to_channels d2c
			JOIN channels c ON d2c.channel_id = c.id
			WHERE d2c.clip_id = ' . $_GET['id']);
    while ($c = db_fetch($channels)) {
        ?>
				 &#183; <?php 
        echo $c['title'];
        ?>
</a><br>
			<?php 
    }
    ?>
		</td>
	</tr>
	<?php 
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:clip.php

示例4: langUnsetFields

function langUnsetFields($form, $names)
{
    //unset fields for other languages
    //todo - take multiple names
    //if (!getOption('languages')) return false;
    $names = array_separated($names);
    foreach ($names as $name) {
        $languages = db_array('SELECT code FROM languages WHERE id <> ' . $_SESSION['language_id']);
        foreach ($languages as &$l) {
            $l = $name . langExt($l);
        }
        $form->unset_fields(implode(',', $languages));
    }
}
开发者ID:Rhenan,项目名称:intranet-1,代码行数:14,代码来源:include.php

示例5: format_post_bits

<?php

include '../../include.php';
if ($posting) {
    format_post_bits('is_selected');
    langTranslatePost('name,description');
    $id = db_save('soc_members');
    url_change_post('../');
}
echo drawTop();
$f = new form('soc_members', @$_GET['id'], $page['title']);
$f->set_field(array('name' => 'name' . langExt(), 'type' => 'text', 'label' => getString('title')));
$f->set_field(array('name' => 'country_id', 'type' => 'select', 'sql' => 'SELECT id, en FROM jr_countries ORDER BY en'));
$f->set_field(array('name' => 'description' . langExt(), 'type' => 'textarea', 'class' => 'tinymce', 'label' => getString('description')));
langUnsetFields($f, 'name,description');
langTranslateCheckbox($f);
$f->set_title_prefix($page['breadcrumbs']);
echo $f->draw();
echo drawBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:19,代码来源:edit.php

示例6: getString

</td>
			</tr>
		<?php 
        }
        ?>
		<tr>
			<td class="left"><?php 
        echo getString('permissions');
        ?>
</td>
			<td colspan="2">
			<?php 
        if ($r['is_admin']) {
            echo "Site Administrator";
        } else {
            $permissions = array_merge(db_array('SELECT m.title' . langExt() . ' title FROM modules m JOIN users_to_modules a ON m.id = a.module_id WHERE a.user_id = ' . $_GET['id'] . ' AND a.is_admin = 1 ORDER BY m.title'), db_array('SELECT m.title' . langExt() . ' title FROM modulettes m JOIN users_to_modulettes a ON m.id = a.modulette_id WHERE a.user_id = ' . $_GET['id'] . ' ORDER BY m.title'));
            if (count($permissions)) {
                sort($permissions);
                echo draw_list($permissions);
            } else {
                echo getString('none');
            }
        }
        ?>
			</td>
		</tr>
	<?php 
    }
    if (getOption("staff_showhome")) {
        ?>
	<tr class="group">
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:view.php

示例7: db_table

</a><br>
			<?php 
        }
        ?>
		</td>
	</tr>
	<?php 
    }
    ?>
	
</table>
<?php 
} else {
    //main table
    $result = db_table('SELECT 
		e.id, e.title' . langExt() . ' title, t.title' . langExt() . ' "group", e2t.type_id
		FROM external_orgs e
		JOIN external_orgs_to_types e2t ON e.id = e2t.org_id
		JOIN external_orgs_types t ON e2t.type_id = t.id
		WHERE e.is_active = 1 ORDER BY t.title, e.title
		');
    $t = new table('external_orgs_types', drawHeader(array('#bottom' => getString('add_new'))));
    $t->set_column('title', 'l', getString('title'));
    foreach ($result as &$r) {
        $r['group'] = draw_link('./type.php?id=' . $r['type_id'], $r['group']);
        $r['title'] = draw_link('./?id=' . $r['id'], $r['title']);
    }
    echo $t->draw($result, 'There are no external orgs added yet.');
    //add new
    include 'edit.php';
}
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:index.php

示例8: drawTop

<?php

include "../include.php";
echo drawTop();
if (url_id()) {
    $title = db_grab('SELECT title' . langExt() . ' title FROM press_clips_types WHERE id = ' . $_GET["id"]);
    $result = db_table('SELECT c.id, c.title' . langExt() . ' title, c.pub_date, c.publication' . langExt() . ' publication, ISNULL(c.created_date, c.updated_date) updated FROM press_clips c ' . getChannelsWhere('press_clips', 'c', 'clip_id') . ' AND c.type_id = ' . $_GET["id"] . ' ORDER BY updated DESC');
    $t = new table('press_clips', drawHeader(false, $title));
    $t->set_column('title', 'l', getString('title'));
    $t->set_column('publication', 'l', getString('publication'));
    $t->set_column('pub_date', 'r', getString('published'));
    foreach ($result as &$r) {
        $r['title'] = draw_link('clip.php?id=' . $r['id'], format_string($r['title'], 50));
        $r['pub_date'] = format_date($r['pub_date']);
    }
    echo $t->draw($result, 'There are no clips tagged <i>' . $title . '</i>.');
} else {
    $t = new table('press_clips', drawHeader());
    $t->set_column('category', 'l', getString('category'));
    $t->set_column('clips', 'r', getString('clips'));
    $result = db_table('SELECT t.id, t.title' . langExt() . ' category, (SELECT COUNT(*) FROM press_clips c WHERE c.type_id = t.id) clips FROM press_clips_types t ORDER BY t.precedence');
    foreach ($result as &$r) {
        $r['category'] = draw_link(url_query_add(array('id' => $r['id']), false), $r['category']);
    }
    echo $t->draw($result);
}
echo drawBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:27,代码来源:categories.php

示例9: db_delete

<?php

include '../include.php';
if (url_action('delete')) {
    db_delete('docs');
    url_drop();
}
echo drawTop();
if (getOption('languages')) {
    $result = db_table('SELECT 
				d.id, 
				d.title' . langExt() . ' title, 
				' . db_updated('d') . ', 
				i.extension, 
				i.description alt, 
				c.title' . langExt() . ' "group",
				l.title language
			FROM docs d
			JOIN docs_to_categories d2c ON d.id = d2c.documentID
			JOIN docs_categories c ON d2c.categoryID = c.id
			JOIN docs_types i ON d.type_id = i.id
			JOIN languages l ON d.language_id = l.id
			' . getChannelsWhere('docs', 'd', 'doc_id') . '
			ORDER BY c.precedence, d.title;');
} else {
    $result = db_table('SELECT d.id, d.title, ' . db_updated('d') . ', i.extension, i.description alt, c.title "group"
			FROM docs d
			JOIN docs_to_categories d2c ON d.id = d2c.documentID
			JOIN docs_categories c ON d2c.categoryID = c.id
			JOIN docs_types i ON d.type_id = i.id
			' . getChannelsWhere('docs', 'd', 'doc_id') . '
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:index.php

示例10: db_delete

<?php

include '../../include.php';
if (url_action('delete')) {
    db_delete('soc_whatsnew', $_GET['delete_id']);
    url_drop('action,delete_id');
}
echo drawTop();
$t = new table('soc_whatsnew', drawHeader(array('edit/' => getString('add_new'))));
$t->set_column('draggy', 'd', '&nbsp;');
$t->set_column('title', 'l', getString('title'));
$t->set_column('updated', 'r', getString('updated'));
$t->set_column('delete', 'd', '&nbsp;');
$result = db_table('SELECT w.id, w.title' . langExt() . ' title, ' . db_updated('w') . ' FROM soc_whatsnew w WHERE w.is_active = 1 ORDER BY w.precedence');
foreach ($result as &$r) {
    $r['draggy'] = draw_img('/images/icons/move.png');
    $r['title'] = draw_link('edit.php?id=' . $r['id'], format_string($r['title'], 70));
    $r['updated'] = format_date($r['updated']);
    $r['delete'] = drawColumnDelete($r['id']);
}
echo $t->draw($result);
echo drawBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:22,代码来源:index.php

示例11: drawTop

<?php

include 'include.php';
echo drawTop();
if (!isset($_GET['office_id'])) {
    $_GET['office_id'] = 1;
    $_josh['request']['path_query'] = '/staff/locations.php?office_id=1';
}
$locations = db_query('SELECT o.id, o.name' . langExt() . ' FROM offices o WHERE o.is_active = 1 AND (SELECT COUNT(*) FROM users u WHERE u.is_active = 1 AND u.officeID = o.id) > 0 ORDER BY o.precedence');
if (db_found($locations)) {
    $pages = array();
    $counter = 1;
    while ($l = db_fetch($locations)) {
        if ($counter < 6) {
            $pages['/staff/locations.php?office_id=' . $l['id']] = $l['name'];
        } else {
            if ($counter == 6) {
                $pages['/staff/locations.php?office_id=other'] = 'Other';
                $others = array();
            }
            $others[] = $l['id'];
        }
        $counter++;
    }
    echo drawNavigation($pages, 'path_query');
}
if ($_GET['office_id'] == 'other') {
    echo drawStaffList('u.is_active = 1 AND u.officeID IN (' . implode(',', $others) . ')');
} else {
    echo drawStaffList('u.is_active = 1 and u.officeID = ' . $_GET['office_id']);
}
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:locations.php

示例12: increment

if (admin()) {
    $f->set_group(getString('permissions'), increment());
    //new rule: only admins can edit permissions
    $f->set_field(array('type' => 'checkbox', 'name' => 'is_admin', 'label' => getString('is_admin'), 'position' => increment()));
    if (!empty($_GET['id'])) {
        $sql = 'SELECT 
					m.id, 
					m.title' . langExt() . ', 
					(SELECT COUNT(*) FROM users_to_modules u2m WHERE u2m.is_admin = 1 AND u2m.module_id = m.id AND u2m.user_id = ' . $_GET['id'] . ') checked
				FROM modules m
				WHERE m.is_active = 1';
    } else {
        $sql = 'SELECT id, title' . langExt() . ' FROM modules WHERE is_active = 1';
    }
    $f->set_field(array('type' => 'checkboxes', 'name' => 'modules', 'label' => getString('module_permissions'), 'sql' => $sql, 'position' => increment()));
    $f->set_field(array('type' => 'checkboxes', 'name' => 'modulettes', 'label' => getString('modulette_permissions'), 'options_table' => 'modulettes', 'linking_table' => 'users_to_modulettes', 'option_title' => 'title' . langExt(), 'option_id' => 'modulette_id', 'object_id' => 'user_id', 'position' => increment()));
} else {
    $f->unset_fields('is_admin');
}
//administrative info (admin)
if ($page['is_admin']) {
    $f->set_group(getString('administrative_info'), increment());
    formAddChannels($f, 'users', 'user_id');
    $f->set_field(array('name' => 'startDate', 'label' => getString('start_date'), 'type' => 'date', 'required' => true, 'position' => increment()));
    $f->set_field(array('name' => 'endDate', 'label' => getString('end_date'), 'type' => 'date', 'required' => false, 'position' => increment()));
    if (getOption('staff_showrank')) {
        $f->set_field(array('name' => 'rankID', 'label' => getString('rank'), 'type' => 'select', 'sql' => 'SELECT id, description FROM intranet_ranks ORDER BY sequence', 'default' => db_grab('SELECT id FROM intranet_ranks WHERE isPayroll = 1'), 'required' => true, 'position' => increment()));
    } else {
        $f->unset_fields('rankID');
    }
    //if (getOption('staff_ldcode')) {
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:add_edit.php

示例13: drawSimpleTop

}
echo drawSimpleTop(getString('login_account_request'));
echo drawMessage(getString('login_account_request_msg'));
$f = new form('users_requests', false, getString('login_account_request'));
$f->set_field(array('type' => 'select', 'sql' => 'SELECT id, title' . langExt() . ' title FROM organizations WHERE is_active = 1 ORDER BY precedence', 'name' => 'organization_id', 'label' => getString('organization'), 'required' => true, 'null_value' => getString('please_select')));
$f->set_field(array('type' => 'text', 'name' => 'firstname', 'label' => getString('name_first')));
$f->set_field(array('type' => 'text', 'name' => 'nickname', 'label' => getString('nickname')));
$f->set_field(array('type' => 'text', 'name' => 'lastname', 'label' => getString('name_last')));
$f->set_field(array('type' => 'text', 'name' => 'title', 'label' => getString('staff_title')));
$f->set_field(array('type' => 'text', 'name' => 'phone', 'label' => getString('telephone')));
$f->set_field(array('type' => 'text', 'name' => 'email', 'label' => getString('email')));
if (getOption('staff_showoffice')) {
    $f->set_field(array('type' => 'select', 'name' => 'officeID', 'label' => getString('location'), 'sql' => 'SELECT id, name FROM offices ORDER BY precedence', 'required' => true));
} else {
    $f->unset_fields('officeID');
}
if (getOption('staff_showdept')) {
    $f->set_field(array('type' => 'select', 'name' => 'departmentID', 'label' => getString('department'), 'sql' => 'SELECT departmentID, departmentName FROM departments WHERE is_active = 1 ORDER BY precedence'));
} else {
    $f->unset_fields('departmentID');
}
if (getOption('channels') && url_id() == user()) {
    $f->set_group(getString('email_prefs'));
    $f->set_field(array('name' => 'email_prefs', 'option_title' => 'title' . langExt(), 'type' => 'checkboxes', 'label' => getString('email_prefs_label'), 'options_table' => 'channels', 'linking_table' => 'users_to_channels_prefs', 'object_id' => 'user_id', 'option_id' => 'channel_id', 'default' => 'all'));
}
if (getOption('legal')) {
    $f->set_field(array('type' => 'checkbox', 'name' => 'legal', 'label' => getString('legal_checkbox')));
}
$f->set_field(array('type' => 'textarea', 'name' => 'bio', 'label' => getString('bio'), 'class' => 'tinymce'));
echo $f->draw();
echo drawSimpleBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:account_request.php

示例14: array

<?php

include 'include.php';
$orgs = array();
if (getOption('staff_allowshared')) {
    $orgs[0] = 'Shared';
}
$orgs = db_table('SELECT id, title' . langExt() . ' title from organizations WHERE is_active = 1 ORDER BY precedence', $orgs, false, false);
echo drawTop();
if (count($orgs) < 8) {
    ?>
<table class='navigation staff' cellspacing='1'>
	<tr class='staff-hilite'>
		<?php 
    foreach ($orgs as $o) {
        ?>
		<td width='14.28%'<?php 
        if (url_id() == $o['id']) {
            ?>
 class='selected'<?php 
        }
        ?>
><?php 
        if (url_id() != $o['id']) {
            ?>
<a href='organizations.php?id=<?php 
            echo $o['id'];
            ?>
'><?php 
        } else {
            ?>
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:organizations.php

示例15: drawTop

<?php

include '../../include.php';
echo drawTop();
echo drawTableStart();
echo drawHeaderRow(false, 1, getString('edit'), 'edit/');
echo '<tr><td class="text">' . db_grab('SELECT content' . langExt() . ' FROM guide') . '</td></tr>';
echo drawTableEnd();
echo drawBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:9,代码来源:index.php


注:本文中的langExt函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。