Ejemplo n.º 1
0
if($val != "" && $val.substr(-1) != "-"){
var xarr = $val.split("-");
var xlen = xarr.length;
--xlen;
$(".keyword_typeahead").html(findMatches(xarr[xlen], keyword_js_var));

}
});
});	
});
';
include 'lib/js.php';
$js = new \parsinegar\js();
$js->path = 'assets/js/';
if ($js->file('article')) {
    if (!$js->comp('article', \parsinegar\js::min($js_data))) {
        $js->file('article', \parsinegar\js::min($js_data));
    }
} else {
    $js->file('article', \parsinegar\js::min($js_data));
}
function in_multiarray($elem, $array, $field, $retkey)
{
    $top = sizeof($array) - 1;
    $bottom = 0;
    while ($bottom <= $top) {
        if ($array[$bottom][$field] == $elem) {
            return $array[$bottom][$retkey];
        } else {
            if (is_array($array[$bottom][$field])) {
                if ($ret = in_multiarray($elem, $array[$bottom][$field], $field, $retkey)) {
Ejemplo n.º 2
0
$("#show_advance").click(function(){
$(".box_advance_search .advance").slideToggle("slow");
});
$("form[name=sForm]").submit(function(event){
if(!$("#q").val().match(/^[\\s\\t\\r\\n]*\\S+/ig)){
event.preventDefault();
}
});
});
});
';
include 'lib/js.php';
$js = new \parsinegar\js();
$js->path = 'assets/js/';
if ($js->file('search')) {
    if (!$js->comp('search', \parsinegar\js::min($js_data))) {
        $js->file('search', \parsinegar\js::min($js_data));
    }
} else {
    $js->file('search', \parsinegar\js::min($js_data));
}
function summarize($str, $limit = 600, $offset = 100, $endlineChars = array('.', '!', '?', "\n", ')', ';', ',', '؟', '،'))
{
    if (strlen($str) <= $limit) {
        return $str;
    }
    for ($i = $limit; $i > $limit - $offset; $i--) {
        if (in_array($str[$i], $endlineChars)) {
            $length = $i;
            break;
        }
Ejemplo n.º 3
0
window.open("' . BASE_PATH . '/user/?do=search&user="******"#user_search").val()+"&token=' . $_SESSION['token'] . '","_blank");
});
$(".not_found_user").fadeIn("slow");
}else{
//alert($("#user_list").children().length);
$(".not_found_user").fadeOut("fast");
}
 });
});
}); 
';
include 'lib/js.php';
$js = new \parsinegar\js();
$js->path = 'assets/js/';
if ($js->file('user')) {
    if (!$js->comp('user', \parsinegar\js::min($js_data))) {
        $js->file('user', \parsinegar\js::min($js_data));
    }
} else {
    $js->file('user', \parsinegar\js::min($js_data));
}
function farsi_correct($string)
{
    // Reverse the string
    $len = mb_strlen($string, 'utf-8');
    $result = '';
    for ($i = $len - 1; $i >= 0; $i--) {
        $result .= mb_substr($string, $i, 1, 'utf-8');
    }
    // These chars work as space when a character comes after them, so the next character will not connect to them
    $spaces_after = array('', ' ', 'ا', 'آ', 'أ', 'إ', 'د', 'ذ', 'ر', 'ز', 'ژ', 'و', 'ؤ');
Ejemplo n.º 4
0
});
}else{
$(".internal").fadeOut("slow",function(){
$(".external").fadeIn("slow");
});
}
});
$(".msg").delay(2000).fadeOut("slow",function(){
$(this).remove();
});
';
include 'lib/js.php';
$js = new \parsinegar\js();
$js->path = 'assets/js/';
if ($js->file('news')) {
    if (!$js->comp('news', \parsinegar\js::min($js_data))) {
        $js->file('news', \parsinegar\js::min($js_data));
    }
} else {
    $js->file('news', \parsinegar\js::min($js_data));
}
function isXmlStructureValid($file)
{
    $prev = libxml_use_internal_errors(true);
    $ret = true;
    try {
        new SimpleXMLElement($file, 0, true);
    } catch (Exception $e) {
        $ret = false;
    }
    if (count(libxml_get_errors()) > 0) {
Ejemplo n.º 5
0
}
});

$("#chmail").submit(function(event){
if(!$("input[name=email]").val().match(/^[\\s\\t\\r\\n]*\\S+/ig)){
event.preventDefault();
}
});
});
});
';
include 'lib/js.php';
$js = new \parsinegar\js();
$js->path = 'assets/js/';
if ($js->file('cpanel')) {
    if (!$js->comp('cpanel', \parsinegar\js::min($js_data))) {
        $js->file('cpanel', \parsinegar\js::min($js_data));
    }
} else {
    $js->file('cpanel', \parsinegar\js::min($js_data));
}
$skill = '';
switch ($_SESSION['permission']) {
    case 'admin':
        $skill = 'مدیریت';
        break;
    case 'teacher':
        $skill = 'استاد';
        break;
    case 'student':
        $skill = 'دانشجو';
Ejemplo n.º 6
0
}
function errorHandler(event){
endproccess()
alert("Error");
}
function abortHandler(event){
	endproccess();
	alert("Error");
}
});
';
        include 'lib/js.php';
        $js = new \parsinegar\js();
        $js->path = 'assets/js/';
        if ($js->file('filemanager')) {
            if (!$js->comp('filemanager', \parsinegar\js::min($js_data))) {
                $js->file('filemanager', \parsinegar\js::min($js_data));
            }
        } else {
            $js->file('filemanager', \parsinegar\js::min($js_data));
        }
        function view($pdo)
        {
            global $_LANGUAGE;
            $template = '<center>
<div id="upload_box">
<form class="file_frm" method="post" enctype="multipart/form-data" onsubmit="uploadFile(event)">
<input type="file" name="file" id="file" value="" accept=".pdf"/>
<a href="javascript:void(0)" onClick=\'document.getElementById("file").click();\'><img src="' . BASE_PATH . '/assets/img/browse.png"/></a>
<input type="text" name="title" id="title" value="" placeholder="عنوان فایل"/>
<input type="submit" value="Upload"/>
Ejemplo n.º 7
0
if($val != "" && $val.substr(-1) != "-"){
var xarr = $val.split("-");
var xlen = xarr.length;
--xlen;
$(".keyword_typeahead").html(findMatches(xarr[xlen], keyword_js_var));

}
});	
});	
});
';
include 'lib/js.php';
$js = new \parsinegar\js();
$js->path = 'assets/js/';
if ($js->file('thesis')) {
    if (!$js->comp('thesis', \parsinegar\js::min($js_data))) {
        $js->file('thesis', \parsinegar\js::min($js_data));
    }
} else {
    $js->file('thesis', \parsinegar\js::min($js_data));
}
$app->getDO('view', ['auth_login' => true], function () use($pdo) {
    global $paginate, $item_pre_page, $btn_pre_page, $_LANGUAGE, $page_display_title;
    $page_display_title = $_LANGUAGE['thesis_list'][DEFAULT_LANGUAGE];
    $more_view = false;
    $title = '';
    $t_arr = '';
    $t = '';
    $pageLink = '';
    if (DEFAULT_LANGUAGE == 'fa') {
        $more = '<div class="fa_more">{content}</div>';