Главная Патенты ЮЗГУ
setQuery("SELECT * FROM #__joe_patentbase_conf LIMIT 1"); $rows = $database->loadObjectList(); $row = $rows[0]; $showdate = $row->showdate; $cf_paging = $row->cf_paging; $cf_groups = 0; $cf_server = $row->cf_server; $cf_login = $row->cf_login; $cf_password = $row->cf_password; $cf_database = $row->cf_database; $mdb = mysql_connect($cf_server, $cf_login, $cf_password); mysql_select_db($cf_database,$mdb); mysql_query('SET NAMES "utf8"', $mdb); $PatentsHelper = new PatentsHelper($mdb,$_SERVER['PHP_SELF']); $rendered = 0; if($_POST['is_search']>0) $p = 2; // выбран год и группа if(($rendered == 0)&&($y > 0)&&($g > 0)) { //заполнение статистики по деталям патента mysql_query("insert into `mctt`.`component_statistic`(`id`,`value`,`name`,`group_id`,`timestamp`) values(null,1,'Group ".$g." statistic',".$g.",current_timestamp)",$mdb); // $query = 'SELECT * FROM `mctt`.`patents` inner join `mctt`.`patents_has_patent_types` on `mctt`.`patents`.`id` = `mctt`.`patents_has_patent_types`.`patents_id` where patent_types_id = '.$g.' and YEAR(Publication_date)='.$y; $_PAGING = new Paging($mdb,$query,'page'); $result = null; if($cf_paging) $result = $_PAGING->get_page($query); else $result = mysql_query ($query,$mdb); $parameters = $PatentsHelper->DeleteParameters(array('p','y','g','d'), $_SERVER['QUERY_STRING']); if(mysql_num_rows($result)>0) { echo $PatentsHelper->ViewPatentsList($result, $parameters); if($cf_paging){ ?>

get_result_text()." патентов".'
'; echo "Страницы: ".$_PAGING->get_prev_page_link().' '.$_PAGING->get_page_links().' '.$_PAGING->get_next_page_link().'
'; ?>
0)) { $query = 'SELECT * FROM `mctt`.`patents` where YEAR(Publication_date)='.$y; $_PAGING = new Paging($mdb,$query,'page'); $result = null; if($cf_paging) $result = $_PAGING->get_page($query); else $result = mysql_query ($query,$mdb); $parameters = $PatentsHelper->DeleteParameters(array('p','y','g','d'), $_SERVER['QUERY_STRING']); if(mysql_num_rows($result)>0) { echo $PatentsHelper->ViewPatentsList($result, $parameters); if($cf_paging){ ?>

get_result_text()." патентов".'
'; echo "Страницы: ".$_PAGING->get_prev_page_link().' '.$_PAGING->get_page_links().' '.$_PAGING->get_next_page_link().'
'; ?>
0)) { //заполнение статистики по деталям патента //mysql_query("update `mctt`.`component_statistic` set value=value+1 where group_id=".$g,$mdb); mysql_query("insert into `mctt`.`component_statistic`(`id`,`value`,`name`,`group_id`,`timestamp`) values(null,1,'Group ".$g." statistic',".$g.",current_timestamp)",$mdb); // $query = 'SELECT * FROM `mctt`.`patents` inner join `mctt`.`patents_has_patent_types` on `mctt`.`patents`.`id` = `mctt`.`patents_has_patent_types`.`patents_id` where patent_types_id = '.$g; $_PAGING = new Paging($mdb,$query,'page'); $result = null; if($cf_paging) $result = $_PAGING->get_page($query); else $result = mysql_query ($query,$mdb); $parameters = $PatentsHelper->DeleteParameters(array('p','y','g','d'), $_SERVER['QUERY_STRING']); if(mysql_num_rows($result)>0) { echo $PatentsHelper->ViewPatentsList($result, $parameters); if($cf_paging){ ?>

get_result_text()." патентов".'
'; echo "Страницы: ".$_PAGING->get_prev_page_link().' '.$_PAGING->get_page_links().' '.$_PAGING->get_next_page_link().'
'; ?>
0)) { //заполнение статистики по деталям патента //$statist_query ="SELECT count(*) FROM `mctt`.`patents_statictic` where patent_id = ".$d; //$statist_result = mysql_query($statist_query,$mdb) or die ("Error in query: $statist_query. ".mysql_error()); //$statist_row = mysql_fetch_row($statist_result); //if ($statist_row[0]<=0) //{ mysql_query("insert into `mctt`.`patents_statictic`(`id`,`patent_id`, `value`,`timestamp`) values (null,".$d.",1,current_timestamp)",$mdb); //} //else //{ // mysql_query("update `mctt`.`patents_statictic` set value=value+1 where patent_id=".$d,$mdb); //} // $query = 'SELECT * FROM `mctt`.`patents` where `mctt`.`patents`.`id`='.$d.' limit 1'; $result = mysql_query ($query,$mdb) or die("Invalid query: " . mysql_error()); $parameters = $PatentsHelper->DeleteParameters(array('p','y','g','d'), $_SERVER['QUERY_STRING']); echo $PatentsHelper->ViewPatentsDetails($result, $parameters); $rendered = 1; } // главная страница if(($rendered == 0)&&($p == 0)) { //заполнение общей статистики обращений к компоненту mysql_query("insert into `mctt`.`component_statistic`(`id`,`value`,`name`,`group_id`,`timestamp`) values(null,1,'Main page',0,current_timestamp)",$mdb); // $parameters = $PatentsHelper->DeleteParameters(array('p','y','g','d'), $_SERVER['QUERY_STRING']); echo $PatentsHelper->ViewPatentsNavigation($parameters); echo "
"; echo $PatentsHelper->ViewPatentsSearch($_SERVER['PHP_SELF'].'?'.$parameters, $parameters, $_POST); $rendered = 1; } // расширенный поиск if(($rendered == 0)&&($p == 1)) { $parameters = $PatentsHelper->DeleteParameters(array('p','y','g','d'), $_SERVER['QUERY_STRING']); echo $PatentsHelper->ViewPatentsAdvancedSearch(); $rendered = 1; } // результаты поиска if(($rendered == 0)&&($p == 2)) { $parameters = $PatentsHelper->DeleteParameters(array('p','y','g','d'), $_SERVER['QUERY_STRING']); $query = 'SELECT `id`, `Name`, `Innovation_Description`, `Patent_number`, `Patent_classes`, `Demand_number`, `Demand_date`, `Application_date`, `Publication_date`, `Description`, `Formula`, `status`, `patents_id`, `patent_types_id` FROM `mctt`.`patents` inner join `mctt`.`patents_has_patent_types` on `mctt`.`patents`.`id` = `mctt`.`patents_has_patent_types`.`patents_id` where '; // простой поиск if($_POST['is_search']==1) { $query = $query . '('; $query = $query . '(UPPER(Name) LIKE concat(\'%\',UPPER(\''.$_POST['Text1'].'\'),\'%\'))'; $query = $query . ' or (id in (select distinct patents_id from (SELECT patents_id, TRIM(if(is_organisation=1,organisation_name,concat(last_name, \' \', left(UPPER(first_name),1), if(first_name=\'\',\'\',\'. \'), left(UPPER(patronimic),1),if(patronimic=\'\',\'\',\'. \')))) as name, TRIM(if(is_organisation=1,organisation_name,concat(last_name, \' \',first_name, if(first_name=\'\',\'\',\' \'), patronimic,if(patronimic=\'\',\'\',\' \')))) as full_name FROM authors inner join patent_authors on authors.id=patent_authors.authors_id where patent_authors.author=1) as T where UPPER(name) LIKE concat(\'%\',UPPER(\''.$_POST['Text1'].'\'),\'%\') or UPPER(full_name) LIKE concat(\'%\',UPPER(\''.$_POST['Text1'].'\'),\'%\') ))'; $query = $query . ' or (UPPER(Patent_number) LIKE concat(\'%\',UPPER(\''.$_POST['Text1'].'\'),\'%\'))'; $query = $query . ')'; if($_POST['Select1']>0) $query = $query .' and patent_types_id = '.$_POST['Select1']; if($_POST['Select2']>0) $query = $query .' and YEAR(Publication_date)='.$_POST['Select2']; } // расширенный поиск if($_POST['is_search']==2) { if(trim($_POST['Text1'])!="") $query = $query . ' and UPPER(Name) LIKE concat(\'%\',UPPER(\''.$_POST['Text1'].'\'),\'%\')'; if(trim($_POST['Text2'])!="") $query = $query . ' and id in (select distinct patents_id from (SELECT patents_id, TRIM(if(is_organisation=1,organisation_name,concat(last_name, \' \', left(UPPER(first_name),1), if(first_name=\'\',\'\',\'. \'), left(UPPER(patronimic),1),if(patronimic=\'\',\'\',\'. \')))) as name, TRIM(if(is_organisation=1,organisation_name,concat(last_name, \' \',first_name, if(first_name=\'\',\'\',\' \'), patronimic,if(patronimic=\'\',\'\',\' \')))) as full_name FROM authors inner join patent_authors on authors.id=patent_authors.authors_id where patent_authors.author=1) as T where UPPER(name) LIKE concat(\'%\',UPPER(\''.$_POST['Text2'].'\'),\'%\') or UPPER(full_name) LIKE concat(\'%\',UPPER(\''.$_POST['Text2'].'\'),\'%\') )'; if(trim($_POST['Text3'])!="") $query = $query . ' and id in (select distinct patents_id from (SELECT patents_id, TRIM(if(is_organisation=1,organisation_name,concat(last_name, \' \', left(UPPER(first_name),1), if(first_name=\'\',\'\',\'. \'), left(UPPER(patronimic),1),if(patronimic=\'\',\'\',\'. \')))) as name, TRIM(if(is_organisation=1,organisation_name,concat(last_name, \' \',first_name, if(first_name=\'\',\'\',\' \'), patronimic,if(patronimic=\'\',\'\',\' \')))) as full_name FROM authors inner join patent_authors on authors.id=patent_authors.authors_id where patent_authors.patent_owner=1) as T where UPPER(name) LIKE concat(\'%\',UPPER(\''.$_POST['Text3'].'\'),\'%\') or UPPER(full_name) LIKE concat(\'%\',UPPER(\''.$_POST['Text3'].'\'),\'%\') )'; if(trim($_POST['Text4'])!="") $query = $query . ' and id in (select distinct patents_id from (SELECT patents_id, TRIM(if(is_organisation=1,organisation_name,concat(last_name, \' \', left(UPPER(first_name),1), if(first_name=\'\',\'\',\'. \'), left(UPPER(patronimic),1),if(patronimic=\'\',\'\',\'. \')))) as name, TRIM(if(is_organisation=1,organisation_name,concat(last_name, \' \',first_name, if(first_name=\'\',\'\',\' \'), patronimic,if(patronimic=\'\',\'\',\' \')))) as full_name FROM authors inner join patent_authors on authors.id=patent_authors.authors_id where patent_authors.pre_author=1) as T where UPPER(name) LIKE concat(\'%\',UPPER(\''.$_POST['Text4'].'\'),\'%\') or UPPER(full_name) LIKE concat(\'%\',UPPER(\''.$_POST['Text4'].'\'),\'%\') )'; if(trim($_POST['Text5'])!="") $query = $query . ' and UPPER(Patent_number) LIKE concat(\'%\',UPPER(\''.$_POST['Text5'].'\'),\'%\')'; if(trim($_POST['Text6'])!="") $query = $query . ' and UPPER(Demand_number) LIKE concat(\'%\',UPPER(\''.$_POST['Text6'].'\'),\'%\')'; if(trim($_POST['Select1'])!=0) $query = $query . 'and patent_types_id = '.$_POST['Select1']; if((trim($_POST['datepicker'])!="")&&(trim($_POST['datepicker1'])!="")) { $query = $query . 'and Demand_date BETWEEN \''.$_POST['datepicker'].'\' AND \''.$_POST['datepicker1'].'\''; } if((trim($_POST['datepicker2'])!="")&&(trim($_POST['datepicker3'])!="")) { $query = $query . 'and Publication_date BETWEEN \''.$_POST['datepicker2'].'\' AND \''.$_POST['datepicker3'].'\''; } if(trim($_POST['TextArea1'])!="") $query = $query . ' and UPPER(Description) LIKE concat(\'%\',UPPER(\''.$_POST['TextArea1'].'\'),\'%\')'; } $_PAGING = new Paging($mdb,$query,'page'); $result = null; if($cf_paging && $_POST['is_search']<1) $result = $_PAGING->get_page($query); else $result = mysql_query ($query,$mdb); $parameters = $PatentsHelper->DeleteParameters(array('p','y','g','d'), $_SERVER['QUERY_STRING']); if(mysql_num_rows($result)>0) { echo $PatentsHelper->ViewPatentsList($result, $parameters); if($cf_paging && $_POST['is_search']<1){ ?>

get_result_text()." патентов".'
'; echo "Страницы: ".$_PAGING->get_prev_page_link().' '.$_PAGING->get_page_links().' '.$_PAGING->get_next_page_link().'
'; ?>

Авторизация



Патенты ЮЗГУ

No images

Календарь событий

Прошлый месяц Декабрь 2018 Следующий месяц
Пн Вт Ср Чт Пт Сб Вс
week 48 1 2
week 49 3 4 5 6 7 8 9
week 50 10 11 12 13 14 15 16
week 51 17 18 19 20 21 22 23
week 52 24 25 26 27 28 29 30
week 1 31

Партнёры





 

 

Фонды и программы

Посещения

Кто на сайте

Сейчас 44 гостей онлайн

Новости ЮЗГУ

Новости RTTN

Информация фонда содействия развитию


mctt