Example #1
0
function GetLangFileName($before, $after, $lang=false)
{
	if ($lang===false)
		$lang = LANGUAGE_ID;

	global $ALL_LANG_FILES;
	$ALL_LANG_FILES[] = $before.$lang.$after;
	if(file_exists($before.$lang.$after))
		return $before.$lang.$after;
	if(file_exists($before."en".$after))
		return $before."en".$after;

	if(strpos($before, "/bitrix/modules/")===false)
		return $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/lang/en/tools.php";

	$old_path = Rtrim($before, "/");
	$old_path = substr($old_path, strlen($_SERVER["DOCUMENT_ROOT"]));
	$path = substr($old_path, 16);
	$module = substr($path, 0, strpos($path, "/"));
	$path = substr($path, strpos($path, "/"));
	if(substr($path, -5)=="/lang")
		$path = substr($path, 0, -5);
	IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module.$path.$after, $lang);
	return $_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module."/lang/".$lang.$path.$after;
}
Example #2
0
*/
if (isset($_GET['arg0']) && $_GET['arg0'] != '') {
    if ($_GET['arg0'] == 'dir') {
        // directory content
        if (isset($_POST['arg1']) && $_POST['arg1'] != '') {
            $realpath = realpath($_POST['arg1']);
            $response['path_abs'] = $realpath === false ? $_POST['arg1'] : $realpath;
        } else {
            $response['path_abs'] = dirname(__FILE__);
        }
        $response['path_abs'] = str_replace('\\', '/', $response['path_abs']);
        //bugfix for lowest level folders
        $response['path_abs'] = Rtrim($response['path_abs'], '/');
        $response['path_up'] = dirname($response['path_abs']);
        $response['path_up'] = str_replace('\\', '/', $response['path_up']);
        $response['path_up'] = Rtrim($response['path_up'], '/');
        $response['readable'] = is_readable($response['path_abs']);
        $response['path'] = array();
        $response['path'] = explode('/', $response['path_abs']);
        $response['content'] = array();
        $dirs = scandir($response['path_abs']);
        foreach ($dirs as $dir) {
            if ($dir == '.' || $dir == '..') {
                continue;
            }
            $temp = array();
            $temp['name'] = $dir;
            $temp['readable'] = is_readable($response['path_abs'] . '/' . $dir);
            $temp['dir'] = is_dir($response['path_abs'] . '/' . $dir);
            $response['content'][] = $temp;
        }
echo odbc_result($process, "field_1") . "\n";
// 1
echo odbc_result($process, "field_2") . "\n";
// 2
echo odbc_result($process, "field_3") . "\n";
// 3
echo odbc_result($process, "field_4") . "\n";
// 4
echo odbc_result($process, "field_5") . "\n";
// 5
echo odbc_result($process, "field_6") . "\n";
// 6
echo odbc_result($process, "field_7") . "\n";
// 7
echo odbc_result($process, "field_8") . "\n";
echo Rtrim(strtoupper(odbc_result($process, "field_9"))) . "\n";
echo odbc_result($process, "field_10") . "\n";
echo odbc_result($process, "field_11") . "\n";
echo odbc_result($process, "field_12") . "\n";
echo odbc_result($process, "field_13") . "\n";
echo odbc_result($process, "field_14") . "\n";
echo odbc_result($process, "field_15") . "\n";
echo odbc_result($process, "field_16") . "\n";
echo odbc_result($process, "field_17") . "\n";
echo odbc_result($process, "field_18") . "\n";
echo odbc_result($process, "field_19") . "\n";
echo odbc_result($process, "field_20") . "\n";
echo odbc_result($process, "field_21") . "\n";
echo odbc_result($process, "field_22") . "\n";
echo odbc_result($process, "field_23") . "\n";
echo odbc_result($process, "field_24") . "\n";
Example #4
0
 public static function getStringFrom($keywords, $startPos, $endPos)
 {
     $newKeywords = "";
     $keywords = Rtrim($keywords, ",");
     for ($startPos; $startPos < $endPos; $startPos++) {
         $newKeywords .= $keywords[$startPos];
     }
     $newKeywords = Rtrim($newKeywords, ",");
     return $newKeywords;
 }