public static function getOne($id)
    {
        $data = array();
        $sql = '
			SELECT * FROM {{translator}}
			WHERE id=' . $id . '
		';
        $item = DB::getRow($sql);
        $sql = '
			SELECT * FROM {{translator}}
			WHERE parent=' . $item['id'] . '
		';
        $rows = DB::getALL($sql);
        foreach (Translator::getLanguage() as $ii => $lang) {
            if ($ii == 0) {
                $data[$item['lang']] = $item;
            } else {
                foreach ($rows as $row) {
                    if ($row['lang'] == $lang['value']) {
                        $data[$row['lang']] = $row;
                    }
                }
            }
        }
        return $data;
    }
Exemple #2
0
				<div class="jsScroll whiteOverflow sections_container">
					<table class="sections_table jsMoveContainerTR" tab="<?php 
echo Funcs::$uri[1];
?>
" page="<?php 
echo $_GET['p'];
?>
">
						<tr class="sections_table_caption_row jsMoveFixed">
							<th class="sections_table_cell">
								<div class="sections_table_caption-holder jsFixedY">
									<span class="sections_table_caption">ID</span>
								</div>
							</th>
							<?php 
foreach (Translator::getLanguage() as $item) {
    ?>
								<th class="sections_table_cell">
									<div class="sections_table_caption-holder jsFixedY">
										<span class="sections_table_caption"><?php 
    echo $item['name'];
    ?>
</span>
									</div>
								</th>
							<?php 
}
?>
							<th class="sections_table_cell">
								<div class="sections_table_caption-holder jsFixedY"></div>
							</th>