-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0979224
Showing
111 changed files
with
4,323 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
|
||
RewriteRule ^(.*)$ index.php?url=$1 [PT,L] | ||
|
||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
class IndexController extends Controller { | ||
|
||
public function index($change=0){ | ||
$data = array(); | ||
$data['title'] = 'Home'; | ||
|
||
|
||
renderView('header', $data); | ||
echo '<body class="page-main">'; | ||
renderView('clientMenu', $data); | ||
renderView('pages/console/index', $data); | ||
renderView('footer', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
class IndexController extends Controller { | ||
|
||
public function index(){ | ||
$data = array(); | ||
$data['title'] = 'FlyBill SMS Billing'; | ||
|
||
HTML::setUserLanguage('en'); | ||
$data['newGuest']=false; | ||
$data['locale']='en_EN'; | ||
|
||
renderView('header', $data); | ||
echo '<body class="page-main">'; | ||
renderView('menu_en', $data); | ||
renderView('pages/en/index', $data); | ||
renderView('footer_en', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
class PriceController extends Controller { | ||
|
||
public function getNumbers($country){ | ||
echo Numbers::getNumbersByCountryJSON($country); | ||
} | ||
|
||
public function getPrices($number){ | ||
echo Prices::getPricesJSON($number); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
class MosubscriptionsController extends Controller { | ||
|
||
public function index($change=0){ | ||
$data = array(); | ||
$data['title'] = 'Pseudo SMS Subscriptions'; | ||
|
||
HTML::setUserLanguage('en'); | ||
$data['newGuest']=false; | ||
$data['locale']='en_EN'; | ||
|
||
$data['countries'] = Countries::getExCountries()->fetchAll(); | ||
renderView('header', $data); | ||
echo '<body class="page-inner">'; | ||
renderView('menu_en', $data); | ||
renderView('pages/en/services/mosubscriptions', $data); | ||
renderView('footer_en', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
class MtsubscriptionsController extends Controller { | ||
|
||
public function index($change=0){ | ||
$data = array(); | ||
$data['title'] = 'MT SMS Subscriptions'; | ||
|
||
HTML::setUserLanguage('en'); | ||
$data['newGuest']=false; | ||
$data['locale']='en_EN'; | ||
|
||
renderView('header', $data); | ||
echo '<body class="page-inner">'; | ||
renderView('menu_en', $data); | ||
renderView('pages/en/services/mtsubscriptions', $data); | ||
renderView('footer_en', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
class PremiumController extends Controller { | ||
|
||
public function index($change=0){ | ||
$data = array(); | ||
$data['title'] = 'Premium SMS'; | ||
|
||
HTML::setUserLanguage('en'); | ||
$data['newGuest']=false; | ||
$data['locale']='en_EN'; | ||
|
||
$data['countries'] = Countries::getExCountries()->fetchAll(); | ||
renderView('header', $data); | ||
echo '<body class="page-inner">'; | ||
renderView('menu_en', $data); | ||
renderView('pages/en/services/premium', $data); | ||
renderView('footer_en', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
class IndexController extends Controller { | ||
|
||
public function index($change=0){ | ||
$data = array(); | ||
$data['title'] = 'FlyBill СМС Биллинг'; | ||
|
||
HTML::setUserLanguage('ru'); | ||
$data['newGuest']=false; | ||
$data['locale']='ru_RU'; | ||
|
||
|
||
renderView('header', $data); | ||
echo '<body class="page-main">'; | ||
renderView('menu', $data); | ||
renderView('pages/index', $data); | ||
renderView('footer', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
class PriceController extends Controller { | ||
|
||
public function getNumbers($country){ | ||
echo Numbers::getNumbersByCountryJSON($country); | ||
} | ||
|
||
public function getPrices($number){ | ||
echo Prices::getPricesJSON($number); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
class MosubscriptionsController extends Controller { | ||
|
||
public function index($change=0){ | ||
$data = array(); | ||
$data['title'] = 'Псевдо подписки СМС'; | ||
|
||
HTML::setUserLanguage('ru'); | ||
$data['newGuest']=false; | ||
$data['locale']='ru_RU'; | ||
|
||
$data['countries'] = Countries::getExCountries()->fetchAll(); | ||
renderView('header', $data); | ||
echo '<body class="page-inner">'; | ||
renderView('menu', $data); | ||
renderView('pages/services/mosubscriptions', $data); | ||
renderView('footer', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
class MtsubscriptionsController extends Controller { | ||
|
||
public function index($change=0){ | ||
$data = array(); | ||
$data['title'] = 'МТ подписки СМС'; | ||
|
||
HTML::setUserLanguage('ru'); | ||
$data['newGuest']=false; | ||
$data['locale']='ru_RU'; | ||
|
||
renderView('header', $data); | ||
echo '<body class="page-inner">'; | ||
renderView('menu', $data); | ||
renderView('pages/services/mtsubscriptions', $data); | ||
renderView('footer', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
class PremiumController extends Controller { | ||
|
||
public function index($change=0){ | ||
$data = array(); | ||
$data['title'] = 'Премиум СМС'; | ||
|
||
HTML::setUserLanguage('ru'); | ||
$data['newGuest']=false; | ||
$data['locale']='ru_RU'; | ||
|
||
$data['countries'] = Countries::getExCountries()->fetchAll(); | ||
renderView('header', $data); | ||
echo '<body class="page-inner">'; | ||
renderView('menu', $data); | ||
renderView('pages/services/premium', $data); | ||
renderView('footer', $data); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
class Countries extends Model | ||
{ | ||
|
||
public static function getCountries(){ | ||
global $db; | ||
$stmt = $db->prepare(" | ||
SELECT * FROM `countries` | ||
"); | ||
$stmt->execute(); | ||
if($stmt->rowCount()>0){ | ||
$stmt->setFetchMode(PDO::FETCH_ASSOC); | ||
} else { | ||
$stmt=FALSE; | ||
} | ||
return $stmt; | ||
} | ||
|
||
public static function getExCountries(){ | ||
global $db; | ||
$stmt = $db->prepare(" | ||
SELECT numbers.`country_id` AS `id`,countries.`name` FROM `numbers` numbers,`countries` countries WHERE numbers.`country_id`=countries.`id` group by `country_id` | ||
"); | ||
$stmt->execute(); | ||
if($stmt->rowCount()>0){ | ||
$stmt->setFetchMode(PDO::FETCH_ASSOC); | ||
} else { | ||
$stmt=FALSE; | ||
} | ||
return $stmt; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
|
||
class Numbers extends Model | ||
{ | ||
|
||
public static function getNumbersByCountryJSON($country){ | ||
global $db; | ||
$stmt = $db->prepare(" | ||
SELECT * FROM `numbers` WHERE `country_id`=:c ORDER BY `price` DESC | ||
"); | ||
$stmt->execute( array( | ||
'c' => $country | ||
)); | ||
if($stmt->rowCount()>0){ | ||
$stmt->setFetchMode(PDO::FETCH_ASSOC); | ||
} else { | ||
$stmt=FALSE; | ||
} | ||
return json_encode($stmt->fetchAll()); | ||
} | ||
|
||
public static function getNumbers(){ | ||
global $db; | ||
$stmt = $db->prepare(" | ||
SELECT numbers.`id`, numbers.`number`, numbers.`preprefix`,numbers.`price`, numbers.`country_id`, numbers.`agregator_id`, countries.`name` AS `country`, agregators.`name` AS `agregator` | ||
FROM `numbers` numbers , `countries` countries, `agregators` agregators | ||
WHERE numbers.`country_id` = countries.`id` and numbers.`agregator_id` = agregators.`id` | ||
ORDER BY numbers.`country_id`, numbers.`price` DESC | ||
"); | ||
$stmt->execute(); | ||
if($stmt->rowCount()>0){ | ||
$stmt->setFetchMode(PDO::FETCH_ASSOC); | ||
} else { | ||
$stmt=FALSE; | ||
} | ||
return $stmt; | ||
} | ||
|
||
public static function addNumber(){ | ||
global $db; | ||
$stmt = $db->prepare(" | ||
SELECT * FROM `numbers` WHERE `country_id`=:c and `number`=:n | ||
"); | ||
$stmt->execute( array( | ||
'c' => $_POST['country'], | ||
'n' => $_POST['number'] | ||
)); | ||
if($stmt->rowCount()==0){ | ||
$data = array( | ||
$_POST['number'],$_POST['price']*100,$_POST['agregator'],$_POST['country'],$_POST['preprefix'] | ||
); | ||
$stmt = $db->prepare(' | ||
INSERT INTO `numbers`(`number`, `price`, `agregator_id`, `country_id`,`preprefix`) VALUES (?,?,?,?,?) | ||
'); | ||
$stmt->execute($data); | ||
} | ||
|
||
} | ||
|
||
public static function saveNumber(){ | ||
print_r($_POST); | ||
global $db; | ||
$data = array( | ||
$_POST['price']*100,$_POST['agregator'],$_POST['country'],$_POST['number'],$_POST['preprefix'],$_POST['number'] | ||
); | ||
$stmt = $db->prepare(' | ||
UPDATE `numbers` SET `price`=?,`agregator_id`=?,`country_id`=?,`number`=?,`preprefix`=? WHERE `number`=? | ||
'); | ||
$stmt->execute($data); | ||
} | ||
|
||
public static function deleteNumber($id){ | ||
global $db; | ||
$data = array( | ||
$id | ||
); | ||
$stmt = $db->prepare(' | ||
DELETE FROM `numbers` WHERE `id`=? | ||
'); | ||
$stmt->execute($data); | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.