Skip to content

Commit

Permalink
версия 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
antflk committed Jul 19, 2016
1 parent d666b39 commit e42550a
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 23 deletions.
1 change: 1 addition & 0 deletions Common/TecDocApiConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
class TecDocApiConfig
{
const HOST = 'tecdoc3.api.abcp.ru';
const USER_KEY = 'USER_KEY';
const USER_LOGIN = 'USER_LOGIN';
const USER_PSW = 'USER_PSW';
Expand Down
3 changes: 2 additions & 1 deletion Pages/Adaptability.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class Adaptability implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$articleId = $_GET['articleId'];
Expand Down
3 changes: 2 additions & 1 deletion Pages/Analogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class Analogs implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$number = $_GET['number'];
Expand Down
3 changes: 2 additions & 1 deletion Pages/ArticleInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class ArticleInfo implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$articleId = $_GET['articleId'];
Expand Down
3 changes: 2 additions & 1 deletion Pages/FullInfoModelVariant.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class FullInfoModelVariant implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$modelId = $_GET['modelVariant'];
Expand Down
8 changes: 5 additions & 3 deletions Pages/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ class Group implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$modificationId = $_GET['modelVariant'];
$categoryId = $_GET['group'];
$articles = $tecDocRestClient->getArticleSimplified($modificationId, $categoryId);
$articles = $tecDocRestClient->getArticleSimplified($modificationId, $categoryId, [], 0);
$viewMode = isset($_GET['viewMode']) ? $_GET['viewMode'] : self::DEFAULT_VIEW_MODE;
$itemsPerPage = isset($_GET['itemsPerPage']) && in_array((int)$_GET['itemsPerPage'], $this->itemsPerPage,
true) ? (int)$_GET['itemsPerPage'] : current($this->itemsPerPage);
Expand Down Expand Up @@ -85,7 +86,8 @@ public function getHtml()
private static function getBreadcrumbs()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$modificationId = (int)$_GET['modelVariant'];
Expand Down
3 changes: 2 additions & 1 deletion Pages/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class Index implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$carType = isset($_GET['carType']) ? $_GET['carType'] : 0;
Expand Down
6 changes: 4 additions & 2 deletions Pages/ModelVariant.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class ModelVariant implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$modificationId = $_GET['modelVariant'];
Expand All @@ -45,7 +46,8 @@ public function getHtml()
private static function getBreadcrumbs()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$modificationId = (int)$_GET['modelVariant'];
Expand Down
6 changes: 4 additions & 2 deletions Pages/Models.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class Models implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$manufacturerId = $_GET['man'];
Expand Down Expand Up @@ -81,7 +82,8 @@ public function getHtml()
private static function getBreadcrumbs()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$breadcrumbs = array();
Expand Down
6 changes: 4 additions & 2 deletions Pages/Modifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class Modifications implements PageInterface
public function getHtml()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$manufacturerId = $_GET['man'];
Expand All @@ -46,7 +47,8 @@ public function getHtml()
private static function getBreadcrumbs()
{
$tecDocRestClient = new TecDoc();
$tecDocRestClient->setUserKey(TecDocApiConfig::USER_KEY)
$tecDocRestClient->setTecdocHost(TecDocApiConfig::HOST)
->setUserKey(TecDocApiConfig::USER_KEY)
->setUserLogin(TecDocApiConfig::USER_LOGIN)
->setUserPsw(TecDocApiConfig::USER_PSW);
$breadcrumbs = array();
Expand Down
2 changes: 1 addition & 1 deletion View/full.info.model.variant.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</tr>
<tr>
<td>Код двигателя</td>
<td>{$data.modification->motorCodes|implode:','}</td>
<td>{$data.modification->motorCodes}</td>
</tr>
<tr>
<td>Вид двигателя</td>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
],
"require": {
"smarty/smarty": "v3.1.19",
"nodasoft/abcp_api_client": "1.3"
"nodasoft/abcp_api_client": "3.2"
}
}
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e42550a

Please sign in to comment.