Skip to content

Commit

Permalink
whmcs connect
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMaxium69 committed Apr 9, 2022
1 parent cd5322f commit b721e05
Show file tree
Hide file tree
Showing 13 changed files with 112 additions and 26 deletions.
8 changes: 8 additions & 0 deletions actu.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php include "app/app.php"; $page = 3; head($page); ?>
<body> <header> <?php navbar($page); ?> </header>

<main>

</main>

<?php footer($page); ?> </body> </html>
21 changes: 21 additions & 0 deletions api/api.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* WHMCS Sample Local API Call
*
* @package WHMCS
* @author WHMCS Limited <[email protected]>
* @copyright Copyright (c) WHMCS Limited 2005-2016
* @license http://www.whmcs.com/license/ WHMCS Eula
* @version $Id$
* @link http://www.whmcs.com/
*/


require_once '../../whmcs/whmcs-8.2.1/whmcs-8.2.1/init.php';
var_dump($_SESSION);

if ($_SESSION['login_auth_tk']){
$isLog = true;
} else {
$isLog = false;
}
41 changes: 41 additions & 0 deletions api/connect.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
/**
* WHMCS Sample Local API Call
*
* @package WHMCS
* @author WHMCS Limited <[email protected]>
* @copyright Copyright (c) WHMCS Limited 2005-2016
* @license http://www.whmcs.com/license/ WHMCS Eula
* @version $Id$
* @link http://www.whmcs.com/
*/

var_dump($_POST);
$username = $_POST['username'];
$password = $_POST['password'];



require_once '../../whmcs/whmcs-8.2.1/whmcs-8.2.1/init.php';

$command = 'ValidateLogin';
$postData = array(
'email' => $username,
'password2' => $password,
);

$results = localAPI($command, $postData);
var_dump($results);
print_r($results);

if ($results['result'] == "success"){

$_SESSION['user-id'] = $results['userid'];
$_SESSION['user-email'] = $username;
$_SESSION['user-passhash'] = $results['passwordhash'];





}
9 changes: 5 additions & 4 deletions app/env.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

//PROD or DEV
$APP_ENV = "PROD";
$APP_ENV = "DEV";


//Variable Share

$env_whmcs = "http://localhost/whmcs/whmcs-8.2.1/whmcs-8.2.1/";
$env_urlFile = "./extension/";
$env_urlLogo = "./assets/LogoOnglet.png";

Expand All @@ -28,7 +29,7 @@
3 => array(
"title" => "Actualité | SolidServ",
"name" => "Actualité",
"url" => "Actualite.php",
"url" => "actu.php",
"css" => "Actualite",
),
4 => array(
Expand All @@ -39,10 +40,10 @@
),
5 => array(
"name" => "Espace client",
"url" => "...",
"url" => $env_whmcs."login" ,
),
6 => array(
"name" => 'Panier',
"url" => '...',
"url" => $env_whmcs."cart.php?a=view",
),
);
9 changes: 3 additions & 6 deletions composant/footer.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@
}

} ?>
<style>

</style>
</ul>
<ul class="ftco-footer-social p-0">
<li class="ftco-animate"><a href="#" data-toggle="tooltip" data-placement="top" title="Instagram"><i class="fab fa-instagram"></i></a></li>
<li class="ftco-animate"><a href="#" data-toggle="tooltip" data-placement="top" title="Twitter"><i class="fab fa-twitter"></i></a></li>
<li class="ftco-animate"><a href="#" data-toggle="tooltip" data-placement="top" title="Linkdin"><i class="fab fa-linkedin"></i></a></li>
<li class="ftco-animate"><a href="https://www.instagram.com/solidserv/" data-toggle="tooltip" data-placement="top" title="Instagram"><i class="fab fa-instagram"></i></a></li>
<li class="ftco-animate"><a href="https://twitter.com/solid_serv" data-toggle="tooltip" data-placement="top" title="Twitter"><i class="fab fa-twitter"></i></a></li>
<li class="ftco-animate"><a href="https://www.linkedin.com/company/solidserv" data-toggle="tooltip" data-placement="top" title="Linkdin"><i class="fab fa-linkedin"></i></a></li>
</ul>
</div>
</div>
Expand Down
10 changes: 9 additions & 1 deletion composant/navbar.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@
<?php
} else if ($i == 5){

echo '<li id="li-espace" class="null"><a class="a-espace" href="' . $env_page[$i]["url"] . '">' . $env_page[$i]["name"] . '</a></li>';
require_once '../whmcs/whmcs-8.2.1/whmcs-8.2.1/init.php';

if ($_SESSION['login_auth_tk']){
echo '<li id="li-espace" class="null"><a class="a-espace" href="' . $env_page[$i]["url"] . '"> Tu est co</a></li>';

} else {
echo '<li id="li-espace" class="null"><a class="a-espace" href="' . $env_page[$i]["url"] . '"> pas co</a></li>';

}

} else if ($i == 6){

Expand Down
2 changes: 1 addition & 1 deletion fivem.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
</main>


</body> </html>
<?php footer($page); ?> </body> </html>
20 changes: 10 additions & 10 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

<div>

<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="stockage.php">voir plus</button>

</div>
</div>
Expand Down Expand Up @@ -144,7 +144,7 @@

</ul>

<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="siteweb.php">voir plus</button>
</div>

</div>
Expand Down Expand Up @@ -179,7 +179,7 @@
</ul>


<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="vps.php">voir plus</button>
</div>

</div>
Expand Down Expand Up @@ -214,7 +214,7 @@
</ul>


<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="minecraft.php">voir plus</button>
</div>

</div>
Expand Down Expand Up @@ -248,7 +248,7 @@

</ul>

<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="fivem.php">voir plus</button>


</div>
Expand All @@ -265,7 +265,7 @@
<hr>
<h3><g>à partir de :</g><br> 30€/Mois</h3>

<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="vps.php">voir plus</button>
</div>
<div class="col-7">
<ul>
Expand Down Expand Up @@ -298,7 +298,7 @@
<hr>
<h3><g>à partir de :</g><br> 30€/Mois</h3>

<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="siteweb.php">voir plus</button>
</div>
<div class="col-7">
<ul>
Expand Down Expand Up @@ -331,7 +331,7 @@
<hr>
<h3><g>à partir de :</g><br> 30€/Mois</h3>

<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="minecraft.php">voir plus</button>
</div>
<div class="col-7">
<ul>
Expand Down Expand Up @@ -364,7 +364,7 @@
<hr>
<h3><g>à partir de :</g><br> 30€/Mois</h3>

<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="fivem.php">voir plus</button>
</div>
<div class="col-7">
<ul>
Expand Down Expand Up @@ -397,7 +397,7 @@
<hr>
<h3><g>à partir de :</g><br> 30€/Mois</h3>

<button id="btn-service" class="tyrobutton" data-url="service.php">voir plus</button>
<button id="btn-service" class="tyrobutton" data-url="stockage.php">voir plus</button>
</div>
<div class="col-7">
<ul>
Expand Down
2 changes: 1 addition & 1 deletion minecraft.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
</main>


</body> </html>
<?php footer($page); ?> </body> </html>
2 changes: 1 addition & 1 deletion siteweb.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
</main>


</body> </html>
<?php footer($page); ?> </body> </html>
2 changes: 1 addition & 1 deletion stockage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
</main>


</body> </html>
<?php footer($page); ?> </body> </html>
8 changes: 8 additions & 0 deletions support.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php include "app/app.php"; $page = 4; head($page); ?>
<body> <header> <?php navbar($page); ?> </header>

<main>

</main>

<?php footer($page); ?> </body> </html>
4 changes: 3 additions & 1 deletion vps.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

</section>

<a class="btn btn-primary" href="<?php echo $env_whmcs."store"?>">SHOP</a>

</main>


</body> </html>
<?php footer($page); ?> </body> </html>

0 comments on commit b721e05

Please sign in to comment.