This commit is contained in:
2026-05-27 11:48:31 -04:00
parent 414f85ad05
commit 5aa5af3411
31 changed files with 2165 additions and 0 deletions

18
.htaccess Normal file
View File

@ -0,0 +1,18 @@
Options -Multiviews
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteBase /
# si fichier ou dossier existe → ne pas toucher
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# envoyer vers CodeIgniter
RewriteRule ^(.*)$ index.php/$1 [L]
# php -- BEGIN cPanel-generated handler, do not edit
# This domain inherits the “PHP” package.
# php -- END cPanel-generated handler, do not edit

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

67
.idea/crm_commun.iml generated Normal file
View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/phpoffice/src/PhpSpreadsheet" isTestSource="false" packagePrefix="PhpOffice\PhpSpreadsheet\" />
<sourceFolder url="file://$MODULE_DIR$/phpoffice/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/phpoffice/tests/PhpSpreadsheetTests" isTestSource="true" packagePrefix="PhpOffice\PhpSpreadsheetTests\" />
<sourceFolder url="file://$MODULE_DIR$/smartadmroot/lib/app" isTestSource="false" packagePrefix="App\" />
<sourceFolder url="file://$MODULE_DIR$/smartadmroot/lib/common" isTestSource="false" packagePrefix="Common\" />
<sourceFolder url="file://$MODULE_DIR$/smartadmroot/lib/smartui" isTestSource="false" packagePrefix="SmartUI\" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/Common" isTestSource="false" packagePrefix="Common\" />
<sourceFolder url="file://$MODULE_DIR$/lib/smartui" isTestSource="false" packagePrefix="SmartUI\" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/erusev/parsedown" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/deprecations" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/firebase/php-jwt" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/apiclient" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/apiclient-services" />
<excludeFolder url="file://$MODULE_DIR$/vendor/google/auth" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
<excludeFolder url="file://$MODULE_DIR$/vendor/mikey179/vfsstream" />
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/paragonie/constant_time_encoding" />
<excludeFolder url="file://$MODULE_DIR$/vendor/paragonie/random_compat" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpseclib/phpseclib" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpstan/phpdoc-parser" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit-mock-objects" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-client" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-factory" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-message" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ralouphie/getallheaders" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-enumerator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/deprecation-contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" />
<excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

36
.idea/deployment.xml generated Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" serverName="dev ms1 crm astral" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false" showNewOnTargetInSync="false">
<option name="confirmBeforeUploading" value="false" />
<serverData>
<paths name="dev express crm astral">
<serverdata>
<mappings>
<mapping deploy="/" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="dev ms1 crm astral">
<serverdata>
<mappings>
<mapping deploy="/" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="prod express crm astral">
<serverdata>
<mappings>
<mapping deploy="/" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="prod ms1 crm astral">
<serverdata>
<mappings>
<mapping deploy="/" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
</component>
</project>

6
.idea/encodings.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/application/language/french/text_express_lang.php" charset="ISO-8859-1" />
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/crm_commun.iml" filepath="$PROJECT_DIR$/.idea/crm_commun.iml" />
</modules>
</component>
</project>

80
.idea/php.xml generated Normal file
View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/erusev/parsedown" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
<path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
<path value="$PROJECT_DIR$/vendor/monolog/monolog" />
<path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
<path value="$PROJECT_DIR$/vendor/mikey179/vfsstream" />
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
<path value="$PROJECT_DIR$/vendor/doctrine/deprecations" />
<path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit-mock-objects" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
<path value="$PROJECT_DIR$/vendor/firebase/php-jwt" />
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
<path value="$PROJECT_DIR$/vendor/paragonie/constant_time_encoding" />
<path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
<path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
<path value="$PROJECT_DIR$/vendor/symfony/yaml" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
<path value="$PROJECT_DIR$/vendor/phpseclib/phpseclib" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
<path value="$PROJECT_DIR$/vendor/phpstan/phpdoc-parser" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
<path value="$PROJECT_DIR$/vendor/psr/http-client" />
<path value="$PROJECT_DIR$/vendor/psr/cache" />
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
<path value="$PROJECT_DIR$/vendor/psr/http-factory" />
<path value="$PROJECT_DIR$/vendor/google/apiclient-services" />
<path value="$PROJECT_DIR$/vendor/psr/log" />
<path value="$PROJECT_DIR$/vendor/google/apiclient" />
<path value="$PROJECT_DIR$/vendor/google/auth" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.4">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PhpUnit">
<phpunit_settings>
<PhpUnitSettings custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" />
</phpunit_settings>
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
</project>

10
.idea/phpspec.xml generated Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PHPSpec">
<suites>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
</suites>
</component>
</project>

11
.idea/phpunit.xml generated Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PHPUnit">
<option name="directories">
<list>
<option value="$PROJECT_DIR$/phpoffice/tests" />
<option value="$PROJECT_DIR$/tests" />
</list>
</option>
</component>
</project>

11
.idea/sshConfigs.xml generated Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SshConfigs">
<configs>
<sshConfig authType="PASSWORD" host="expresscrmdev.progiweb.net" id="e58f6296-625b-4c26-82bc-afb10df44758" port="7822" nameFormat="DESCRIPTIVE" username="devcrmexpress" useOpenSSHConfig="true" />
<sshConfig authType="PASSWORD" host="ms1crmdev.progiweb.net" id="890d994d-ed6f-4f63-8da3-f680b1154eda" port="7822" nameFormat="DESCRIPTIVE" username="devcrmms1" useOpenSSHConfig="true" />
<sshConfig authType="PASSWORD" host="ms1crm.interne.ca" id="aae4f5e9-693e-44aa-aedf-7ab13e4fbf86" port="7822" nameFormat="DESCRIPTIVE" username="ms1crm" useOpenSSHConfig="true" />
<sshConfig authType="PASSWORD" host="expressgroupes.interne.ca" id="c279eed4-890e-4698-b074-233949cea2d3" port="7822" nameFormat="DESCRIPTIVE" username="crmexpress" useOpenSSHConfig="true" />
</configs>
</component>
</project>

7
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

35
.idea/webServers.xml generated Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WebServers">
<option name="servers">
<webServer id="e28bcf65-5bd3-428d-9d75-110c45a14b87" name="dev express crm astral" url="http://progiweb.net">
<fileTransfer rootFolder="/home/devcrmexpress/public_html" accessType="SFTP" host="expresscrmdev.progiweb.net" port="7822" sshConfigId="e58f6296-625b-4c26-82bc-afb10df44758" sshConfig="devcrmexpress@expresscrmdev.progiweb.net:7822 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
<webServer id="8aa830d2-5943-45ea-a943-d81fd6a13fa7" name="prod express crm astral" url="http://progiweb.net">
<fileTransfer rootFolder="/home/crmexpress/public_html" accessType="SFTP" host="expressgroupes.interne.ca" port="7822" sshConfigId="c279eed4-890e-4698-b074-233949cea2d3" sshConfig="crmexpress@expressgroupes.interne.ca:7822 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
<webServer id="c17cd6a8-1d04-47b7-8a27-1b3156bcef51" name="prod ms1 crm astral" url="http://progiweb.net">
<fileTransfer rootFolder="/home/ms1crm/public_html" accessType="SFTP" host="ms1crm.interne.ca" port="7822" sshConfigId="aae4f5e9-693e-44aa-aedf-7ab13e4fbf86" sshConfig="ms1crm@ms1crm.interne.ca:7822 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
<webServer id="08534ad3-f089-404e-9bfa-c0479c73f7e7" name="dev ms1 crm astral">
<fileTransfer rootFolder="/home/devcrmms1/public_html" accessType="SFTP" host="ms1crmdev.progiweb.net" port="7822" sshConfigId="890d994d-ed6f-4f63-8da3-f680b1154eda" sshConfig="devcrmms1@ms1crmdev.progiweb.net:7822 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
</option>
</component>
</project>

31
composer.json Normal file
View File

@ -0,0 +1,31 @@
{
"description": "The CodeIgniter framework",
"name": "codeigniter/framework",
"type": "project",
"homepage": "https://codeigniter.com",
"license": "MIT",
"support": {
"forum": "http://forum.codeigniter.com/",
"wiki": "https://github.com/bcit-ci/CodeIgniter/wiki",
"slack": "https://codeigniterchat.slack.com",
"source": "https://github.com/bcit-ci/CodeIgniter"
},
"require": {
"php": ">=5.3.7",
"google/apiclient": "^2.0"
},
"suggest": {
"paragonie/random_compat": "Provides better randomness in PHP 5.x"
},
"require-dev": {
"mikey179/vfsstream": "1.1.*",
"phpunit/phpunit": "4.* || 5.*"
},
"autoload": {
"psr-4": {
"Common\\": "Common/",
"SmartUI\\": "lib/smartui/"
}
}
}

1
credentials.json Normal file
View File

@ -0,0 +1 @@
{"web":{"client_id":"757586711309-lmhhl49m6o1kfs3qdm6ruhkudik3nk46.apps.googleusercontent.com","project_id":"backup-astral1","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"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","javascript_origins":["https://ms1crmdev.progiweb.net"]}}

323
index.php Normal file
View File

@ -0,0 +1,323 @@
<?php
//initilize the page
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
* @license https://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
* @filesource
*/
/*
*---------------------------------------------------------------
* APPLICATION ENVIRONMENT
*---------------------------------------------------------------
*
* You can load different configurations depending on your
* current environment. Setting the environment also influences
* things like logging and error reporting.
*
* This can be set to anything, but default usage is:
*
* development
* testing
* production
*
* NOTE: If you change these, also change the error_reporting() code below
*/
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
/*
*---------------------------------------------------------------
* ERROR REPORTING
*---------------------------------------------------------------
*
* Different environments will require different levels of error reporting.
* By default development will show errors but testing and live will hide them.
*/
switch (ENVIRONMENT)
{
case 'development':
//error_reporting(-1);
//ini_set('display_errors', 1);
break;
case 'testing':
case 'production':
ini_set('display_errors', 0);
if (version_compare(PHP_VERSION, '5.3', '>='))
{
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
}
else
{
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
}
break;
default:
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'The application environment is not set correctly.';
exit(1); // EXIT_ERROR
}
/*
*---------------------------------------------------------------
* SYSTEM DIRECTORY NAME
*---------------------------------------------------------------
*
* This variable must contain the name of your "system" directory.
* Set the path if it is not in the same directory as this file.
*/
$system_path = 'system';
/*
*---------------------------------------------------------------
* APPLICATION DIRECTORY NAME
*---------------------------------------------------------------
*
* If you want this front controller to use a different "application"
* directory than the default one you can set its name here. The directory
* can also be renamed or relocated anywhere on your server. If you do,
* use an absolute (full) server path.
* For more info please see the user guide:
*
* https://codeigniter.com/user_guide/general/managing_apps.html
*
* NO TRAILING SLASH!
*/
$application_folder = 'application';
/*
*---------------------------------------------------------------
* VIEW DIRECTORY NAME
*---------------------------------------------------------------
*
* If you want to move the view directory out of the application
* directory, set the path to it here. The directory can be renamed
* and relocated anywhere on your server. If blank, it will default
* to the standard location inside your application directory.
* If you do move this, use an absolute (full) server path.
*
* NO TRAILING SLASH!
*/
$view_folder = '';
/*
* --------------------------------------------------------------------
* DEFAULT CONTROLLER
* --------------------------------------------------------------------
*
* Normally you will set your default controller in the routes.php file.
* You can, however, force a custom routing by hard-coding a
* specific controller class/function here. For most applications, you
* WILL NOT set your routing here, but it's an option for those
* special instances where you might want to override the standard
* routing in a specific front controller that shares a common CI installation.
*
* IMPORTANT: If you set the routing here, NO OTHER controller will be
* callable. In essence, this preference limits your application to ONE
* specific controller. Leave the function name blank if you need
* to call functions dynamically via the URI.
*
* Un-comment the $routing array below to use this feature
*/
// The directory name, relative to the "controllers" directory. Leave blank
// if your controller is not in a sub-directory within the "controllers" one
// $routing['directory'] = '';
// The controller class file name. Example: mycontroller
// $routing['controller'] = '';
// The controller function you wish to be called.
// $routing['function'] = '';
/*
* -------------------------------------------------------------------
* CUSTOM CONFIG VALUES
* -------------------------------------------------------------------
*
* The $assign_to_config array below will be passed dynamically to the
* config class when initialized. This allows you to set custom config
* items or override any default config values found in the config.php file.
* This can be handy as it permits you to share one application between
* multiple front controller files, with each file containing different
* config values.
*
* Un-comment the $assign_to_config array below to use this feature
*/
// $assign_to_config['name_of_config_item'] = 'value of config item';
// --------------------------------------------------------------------
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
// --------------------------------------------------------------------
/*
* ---------------------------------------------------------------
* Resolve the system path for increased reliability
* ---------------------------------------------------------------
*/
// Set the current directory correctly for CLI requests
if (defined('STDIN'))
{
chdir(dirname(__FILE__));
}
if (($_temp = realpath($system_path)) !== FALSE)
{
$system_path = $_temp.DIRECTORY_SEPARATOR;
}
else
{
// Ensure there's a trailing slash
$system_path = strtr(
rtrim($system_path, '/\\'),
'/\\',
DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
).DIRECTORY_SEPARATOR;
}
// Is the system path correct?
if ( ! is_dir($system_path))
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
exit(3); // EXIT_CONFIG
}
/*
* -------------------------------------------------------------------
* Now that we know the path, set the main path constants
* -------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// Path to the system directory
define('BASEPATH', $system_path);
// Path to the front controller (this file) directory
define('FCPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
// Name of the "system" directory
define('SYSDIR', basename(BASEPATH));
// The path to the "application" directory
if (is_dir($application_folder))
{
if (($_temp = realpath($application_folder)) !== FALSE)
{
$application_folder = $_temp;
}
else
{
$application_folder = strtr(
rtrim($application_folder, '/\\'),
'/\\',
DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
);
}
}
elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
{
$application_folder = BASEPATH.strtr(
trim($application_folder, '/\\'),
'/\\',
DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
);
}
else
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
exit(3); // EXIT_CONFIG
}
define('APPPATH', $application_folder.DIRECTORY_SEPARATOR);
// The path to the "views" directory
if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
{
$view_folder = APPPATH.'views';
}
elseif (is_dir($view_folder))
{
if (($_temp = realpath($view_folder)) !== FALSE)
{
$view_folder = $_temp;
}
else
{
$view_folder = strtr(
rtrim($view_folder, '/\\'),
'/\\',
DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
);
}
}
elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
{
$view_folder = APPPATH.strtr(
trim($view_folder, '/\\'),
'/\\',
DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
);
}
else
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
exit(3); // EXIT_CONFIG
}
define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR);
/*
* --------------------------------------------------------------------
* LOAD THE BOOTSTRAP FILE
* --------------------------------------------------------------------
*
* And away we go...
*/
require_once BASEPATH.'core/CodeIgniter.php';

73
init.php Normal file
View File

@ -0,0 +1,73 @@
<?php
require_once __DIR__ . '/vendor/autoload.php';
//configure constants
define('DS', DIRECTORY_SEPARATOR);
define('EOL', PHP_EOL);
define('__DEV__', getenv('DEV') === 'on');
if (!isset($argv)) {
$argv = array(isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : __FILE__);
$args_list = isset($_GET['argv']) && is_array($_GET['argv']) ? $_GET['argv'] : $_GET;
foreach ($args_list as $key => $value) {
if ($value) $argv[] = $value;
}
}
if (Common\Util::is_cli()) {
$document_root = realpath(isset($argv[1]) && is_dir($argv[1]) ? $argv[1] : dirname(__DIR__));
$server_name = gethostname();
$request_uri = str_replace(DS, '/', substr($_SERVER['PHP_SELF'], strlen($document_root)));
} else {
$document_root = realpath($_SERVER['DOCUMENT_ROOT']);
$server_name = $_SERVER['HTTP_HOST'];
$request_uri = $_SERVER['REQUEST_URI'];
}
$document_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on' ? 'https' : 'http').'://'.$server_name;
$app_path = $document_root;
$app_url = $document_url;
if (strpos(__DIR__, $document_root) === 0) {
$app_uri = substr(__DIR__, strlen($document_root));
$app_path .= $app_uri;
$app_url .= str_replace(DS, '/', $app_uri);
}
define('DOCUMENT_ROOT', $document_root);
define('SERVER_NAME', $server_name);
define('SERVER_URL', $document_url);
define('SERVER_REQUEST', $document_url.$request_uri);
define('APP_PATH', $app_path);
define('APP_URL', $app_url);
//Assets URL, location of your css, img, js, etc. files
define('ASSETS_URL', APP_URL);
define('ASSETS_PATH', APP_PATH);
// configure global constants
// define('APP_TMP_PATH', APP_PATH.DS.'tmp');
// define('APP_TMP_URL', APP_URL.'/tmp');
// global functions
require_once __DIR__.'/lib/func.php';
require_once __DIR__.'/lib/config.php';
// configure SmartUI
\SmartUI\UI::$icon_source = 'fa';
// register our UI plugins
\SmartUI\UI::register('widget', 'SmartUI\Components\Widget');
\SmartUI\UI::register('datatable', 'SmartUI\Components\DataTable');
\SmartUI\UI::register('button', 'SmartUI\Components\Button');
\SmartUI\UI::register('tab', 'SmartUI\Components\Tab');
\SmartUI\UI::register('accordion', 'SmartUI\Components\Accordion');
\SmartUI\UI::register('carousel', 'SmartUI\Components\Carousel');
\SmartUI\UI::register('smartform', 'SmartUI\Components\SmartForm');
\SmartUI\UI::register('nav', 'SmartUI\Components\Nav');
$_ui = new \SmartUI\UI();

145
init.web.php Normal file
View File

@ -0,0 +1,145 @@
<?php
if (!session_id()) session_start();
require_once 'init.php';
//CONFIGURATION for SmartAdmin UI
//ribbon breadcrumbs config
//array("Display Name" => "URL");
$breadcrumbs = array(
"Home" => APP_URL
);
/*navigation array config
ex:
"dashboard" => array(
"title" => "Display Title",
"url" => "http://yoururl.com",
"url_target" => "_self",
"icon" => "fa-home",
"label_htm" => "<span>Add your custom label/badge html here</span>",
"sub" => array() //contains array of sub items with the same format as the parent
)
*/
$page_nav = array(
"dash1" => array(
"title" => "Tableaux de bord",
"icon" => "fa-dashboard",
"url" => APP_URL."/index.php/Home"
),
"dash5" => array(
"title" => "Tâches",
"icon" => "fa-square",
"url" => APP_URL."/index.php/projets/list_taches"
),
"dash4" => array(
"title" => "Tâches Projets",
"icon" => "fa-square",
"url" => APP_URL."/index.php/TachesProjets"
),
"dash3" => array(
"title" => "Départs à venir",
"icon" => "fa-square",
"url" => APP_URL."/index.php/projets/depart"
),
"vide" => array(
"title" => ""
),
"clients" => array(
"title" => "Clients",
"icon" => "fa-pencil-square-o",
"url" => APP_URL."/index.php/clients"
),
"fournisseurs" => array(
"title" => "Fournisseurs",
"icon" => "fa-pencil-square-o",
"url" => APP_URL."/index.php/fournisseurs"
),
"fournisseursprojets" => array(
"title" => "Fournisseurs / Projets",
"icon" => "fa-pencil-square-o",
"url" => APP_URL."/index.php/Fournisseursprojets"
),
"produits" => array(
"title" => "Produits",
"icon" => "fa-pencil-square-o",
"url" => APP_URL."/index.php/produits"
),
"vide2" => array(
"title" => ""
),
"projets" => array(
"title" => "Projets",
"icon" => "fa-suitcase",
"url" => APP_URL."/index.php/projets"
)
,
"paiement" => array(
"title" => "Paiements",
"icon" => " fa-dollar",
"url" => APP_URL."/index.php/paiements"
)
,
"lot" => array(
"title" => "Lot",
"icon" => "fa-envelope-o",
"url" => APP_URL."/index.php/lots"
)
,
"user" => array(
"title" => "Utilisateur",
"icon" => "fa-user",
"url" => APP_URL."/index.php/user"
)
,
"inventaireitem" => array(
"title" => "items",
"icon" => "fa-pencil-square-o",
"url" => APP_URL."/v4/dynamic/list/inventaire"
)
,
"inventaire" => array(
"title" => "items Par Localication",
"icon" => "fa-pencil-square-o",
"url" => APP_URL."/v4/dynamic/list/inventaire_stock"
)
);
//configuration variables
$page_title = "";
$page_css = array();
$no_main_header = false; //set true for lock.php and login.php
$page_body_prop = array(); //optional properties for <body>
$page_html_prop = array(); //optional properties for <html>
?>

8
phpinfo.php Normal file
View File

@ -0,0 +1,8 @@
<?php
phpinfo();
/**
* Created by PhpStorm.
* User: Utilisateur
* Date: 2019-04-09
* Time: 10:35
*/

70
readme.rst Normal file
View File

@ -0,0 +1,70 @@
###################
What is CodeIgniter
###################
CodeIgniter is an Application Development Framework - a toolkit - for people
who build web sites using PHP. Its goal is to enable you to develop projects
much faster than you could if you were writing code from scratch, by providing
a rich set of libraries for commonly needed tasks, as well as a simple
interface and logical structure to access these libraries. CodeIgniter lets
you creatively focus on your project by minimizing the amount of code needed
for a given task.
*******************
Release Information
*******************
This repo contains in-development code for future releases. To download the
latest stable release please visit the `CodeIgniter Downloads
<https://codeigniter.com/download>`_ page.
**************************
Changelog and New Features
**************************
You can find a list of all changes for each release in the `user
guide change log <https://github.com/bcit-ci/CodeIgniter/blob/develop/user_guide_src/source/changelog.rst>`_.
*******************
Server Requirements
*******************
PHP version 5.6 or newer is recommended.
It should work on 5.3.7 as well, but we strongly advise you NOT to run
such old versions of PHP, because of potential security and performance
issues, as well as missing features.
************
Installation
************
Please see the `installation section <https://codeigniter.com/user_guide/installation/index.html>`_
of the CodeIgniter User Guide.
*******
License
*******
Please see the `license
agreement <https://github.com/bcit-ci/CodeIgniter/blob/develop/user_guide_src/source/license.rst>`_.
*********
Resources
*********
- `User Guide <https://codeigniter.com/docs>`_
- `Language File Translations <https://github.com/bcit-ci/codeigniter3-translations>`_
- `Community Forums <http://forum.codeigniter.com/>`_
- `Community Wiki <https://github.com/bcit-ci/CodeIgniter/wiki>`_
- `Community Slack Channel <https://codeigniterchat.slack.com>`_
Report security issues to our `Security Panel <mailto:security@codeigniter.com>`_
or via our `page on HackerOne <https://hackerone.com/codeigniter>`_, thank you.
***************
Acknowledgement
***************
The CodeIgniter team would like to thank EllisLab, all the
contributors to the CodeIgniter project and you, the CodeIgniter user.

2
session_test.php Normal file
View File

@ -0,0 +1,2 @@
<?php
echo session_save_path();

232
skins.php Normal file
View File

@ -0,0 +1,232 @@
<?php
//initilize the page
require_once 'init.web.php';
/*---------------- PHP Custom Scripts ---------
YOU CAN SET CONFIGURATION VARIABLES HERE BEFORE IT GOES TO NAV, RIBBON, ETC.
E.G. $page_title = "Custom Title" */
$page_title = "Prebuilt Skins";
/* ---------------- END PHP Custom Scripts ------------- */
//include header
//you can add your custom css in $page_css array.
//Note: all css files are inside css/ folder
$page_css[] = "your_style.css";
include("inc/header.php");
//include left panel (navigation)
//follow the tree in inc/config.ui.php
$page_nav["smartint"]["sub"]["skins"]["active"] = true;
include("inc/nav.php");
?>
<!-- ==========================CONTENT STARTS HERE ========================== -->
<!-- MAIN PANEL -->
<div id="main" role="main">
<?php
//configure ribbon (breadcrumbs) array("name"=>"url"), leave url empty if no url
//$breadcrumbs["New Crumb"] => "http://url.com"
$breadcrumbs["SmartAdmin Intel"] = "";
include("inc/ribbon.php");
?>
<!-- MAIN CONTENT -->
<div id="content">
<!-- row -->
<div class="row">
<!-- col -->
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<h1 class="page-title txt-color-blueDark text-center well">
<!-- PAGE HEADER -->
SmartAdmin Pre-built Skins<br>
<small class="text-primary">Don't like the default look of SmartAdmin? Not a problem! SmartAdmin comes with 6 prebuilt skins to choose from.</small>
</h1>
</div>
<!-- end col -->
</div>
<!-- end row -->
<!--
The ID "widget-grid" will start to initialize all widgets below
You do not need to use widgets if you dont want to. Simply remove
the <section></section> and you can use wells or panels instead
-->
<!-- widget grid -->
<section id="widget-grid" class="">
<!-- row -->
<div class="row">
<!-- a blank row to get started -->
<div class="col-sm-6">
<!-- your contents here -->
<div class="well text-center">
<h5>
Skin name "<strong>Glass</strong>" <br>
<small>Add the following class to body tag <code>.smart-style-5</code></small>
</h5>
<img src="img/demo/layout-skins/skin-glass.png" class="img-responsive center-block" style="box-shadow: 0px 0px 3px 0px #919191;">
</div>
</div>
<div class="col-sm-6">
<!-- your contents here -->
<div class="well text-center">
<h5>
Skin name "<strong>Google</strong>" <br>
<small>Add the following class to body tag <code>.smart-style-3</code></small>
</h5>
<img src="img/demo/layout-skins/skin-google.png" class="img-responsive center-block" style="box-shadow: 0px 0px 3px 0px #919191;">
</div>
</div>
</div>
<div class="row">
<!-- a blank row to get started -->
<div class="col-sm-6">
<!-- your contents here -->
<div class="well text-center">
<h5>
Skin name "<strong>PixelSmash</strong>" <br>
<small>Add the following class to body tag <code>.smart-style-4</code></small>
</h5>
<img src="img/demo/layout-skins/skin-pixel.png" class="img-responsive center-block" style="box-shadow: 0px 0px 3px 0px #919191;">
</div>
</div>
<div class="col-sm-6">
<!-- your contents here -->
<div class="well text-center">
<h5>
Skin name "<strong>Dark Elegance</strong>" <br>
<small>Add the following class to body tag <code>.smart-style-1</code></small>
</h5>
<img src="img/demo/layout-skins/skin-dark.png" class="img-responsive center-block" style="box-shadow: 0px 0px 3px 0px #919191;">
</div>
</div>
</div>
<div class="row">
<!-- a blank row to get started -->
<div class="col-sm-6">
<!-- your contents here -->
<div class="well text-center">
<h5>
Skin name "<strong>Default</strong>" <br>
<small>Add the following class to body tag <code>.smart-style-0</code></small>
</h5>
<img src="img/demo/layout-skins/skin-default.png" class="img-responsive center-block" style="box-shadow: 0px 0px 3px 0px #919191;">
</div>
</div>
<div class="col-sm-6">
<!-- your contents here -->
<div class="well text-center">
<h5>
Skin name "<strong>Ultra Light</strong>" <br>
<small>Add the following class to body tag <code>.smart-style-2</code></small>
</h5>
<img src="img/demo/layout-skins/skin-ultralight.png" class="img-responsive center-block" style="box-shadow: 0px 0px 3px 0px #919191;">
</div>
</div>
</div>
<!-- end row -->
</section>
<!-- end widget grid -->
</div>
<!-- END MAIN CONTENT -->
</div>
<!-- END MAIN PANEL -->
<!-- ==========================CONTENT ENDS HERE ========================== -->
<?php
// include page footer
include("inc/footer.php");
?>
<?php
//include required scripts
include("inc/scripts.php");
?>
<!-- PAGE RELATED PLUGIN(S)
<script src="<?php echo ASSETS_URL; ?>/js/plugin/YOURJS.js"></script>-->
<script>
$(document).ready(function() {
/* DO NOT REMOVE : GLOBAL FUNCTIONS!
*
* pageSetUp(); WILL CALL THE FOLLOWING FUNCTIONS
*
* // activate tooltips
* $("[rel=tooltip]").tooltip();
*
* // activate popovers
* $("[rel=popover]").popover();
*
* // activate popovers with hover states
* $("[rel=popover-hover]").popover({ trigger: "hover" });
*
* // activate inline charts
* runAllCharts();
*
* // setup widgets
* setup_widgets_desktop();
*
* // run form elements
* runAllForms();
*
********************************
*
* pageSetUp() is needed whenever you load a page.
* It initializes and checks for all basic elements of the page
* and makes rendering easier.
*
*/
pageSetUp();
/*
* ALL PAGE RELATED SCRIPTS CAN GO BELOW HERE
* eg alert("my home function");
*
* var pagefunction = function() {
* ...
* }
* loadScript("js/plugin/_PLUGIN_NAME_.js", pagefunction);
*
* TO LOAD A SCRIPT:
* var pagefunction = function (){
* loadScript(".../plugin.js", run_after_loaded);
* }
*
* OR
*
* loadScript(".../plugin.js", run_after_loaded);
*/
})
</script>
<?php
//include footer
include("inc/google-analytics.php");
?>

130
sl.php Normal file
View File

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Font Awesome 4.1 Liste fournie</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css">
<style>
body { font-family: Arial, sans-serif; }
.icon-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 10px;
}
.icon-box {
border: 1px solid #ddd;
padding: 8px;
font-size: 12px;
display: flex;
align-items: center;
gap: 8px;
}
.icon-box i {
font-size: 18px;
width: 24px;
text-align: center;
}
h2 { margin-top: 30px; }
</style>
</head>
<body>
<h1>Font Awesome 4.1 Icônes (liste fournie)</h1>
<div class="icon-grid">
<i class="fa fa-automobile icon-box"></i>fa-automobile<br>
<i class="fa fa-bank icon-box"></i>fa-bank<br>
<i class="fa fa-behance icon-box"></i>fa-behance<br>
<i class="fa fa-behance-square icon-box"></i>fa-behance-square<br>
<i class="fa fa-bomb icon-box"></i>fa-bomb<br>
<i class="fa fa-building icon-box"></i>fa-building<br>
<i class="fa fa-cab icon-box"></i>fa-cab<br>
<i class="fa fa-car icon-box"></i>fa-car<br>
<i class="fa fa-child icon-box"></i>fa-child<br>
<i class="fa fa-circle-o-notch icon-box"></i>fa-circle-o-notch<br>
<i class="fa fa-circle-thin icon-box"></i>fa-circle-thin<br>
<i class="fa fa-codepen icon-box"></i>fa-codepen<br>
<i class="fa fa-cube icon-box"></i>fa-cube<br>
<i class="fa fa-cubes icon-box"></i>fa-cubes<br>
<i class="fa fa-database icon-box"></i>fa-database<br>
<i class="fa fa-delicious icon-box"></i>fa-delicious<br>
<i class="fa fa-deviantart icon-box"></i>fa-deviantart<br>
<i class="fa fa-digg icon-box"></i>fa-digg<br>
<i class="fa fa-drupal icon-box"></i>fa-drupal<br>
<i class="fa fa-empire icon-box"></i>fa-empire<br>
<i class="fa fa-envelope-square icon-box"></i>fa-envelope-square<br>
<i class="fa fa-fax icon-box"></i>fa-fax<br>
<i class="fa fa-file-archive-o icon-box"></i>fa-file-archive-o<br>
<i class="fa fa-file-audio-o icon-box"></i>fa-file-audio-o<br>
<i class="fa fa-file-code-o icon-box"></i>fa-file-code-o<br>
<i class="fa fa-file-excel-o icon-box"></i>fa-file-excel-o<br>
<i class="fa fa-file-image-o icon-box"></i>fa-file-image-o<br>
<i class="fa fa-file-movie-o icon-box"></i>fa-file-movie-o<br>
<i class="fa fa-file-pdf-o icon-box"></i>fa-file-pdf-o<br>
<i class="fa fa-file-photo-o icon-box"></i>fa-file-photo-o<br>
<i class="fa fa-file-picture-o icon-box"></i>fa-file-picture-o<br>
<i class="fa fa-file-powerpoint-o icon-box"></i>fa-file-powerpoint-o<br>
<i class="fa fa-file-sound-o icon-box"></i>fa-file-sound-o<br>
<i class="fa fa-file-video-o icon-box"></i>fa-file-video-o<br>
<i class="fa fa-file-word-o icon-box"></i>fa-file-word-o<br>
<i class="fa fa-file-zip-o icon-box"></i>fa-file-zip-o<br>
<i class="fa fa-ge icon-box"></i>fa-ge<br>
<i class="fa fa-git icon-box"></i>fa-git<br>
<i class="fa fa-git-square icon-box"></i>fa-git-square<br>
<i class="fa fa-google icon-box"></i>fa-google<br>
<i class="fa fa-graduation-cap icon-box"></i>fa-graduation-cap<br>
<i class="fa fa-hacker-news icon-box"></i>fa-hacker-news<br>
<i class="fa fa-header icon-box"></i>fa-header<br>
<i class="fa fa-history icon-box"></i>fa-history<br>
<i class="fa fa-institution icon-box"></i>fa-institution<br>
<i class="fa fa-joomla icon-box"></i>fa-joomla<br>
<i class="fa fa-jsfiddle icon-box"></i>fa-jsfiddle<br>
<i class="fa fa-language icon-box"></i>fa-language<br>
<i class="fa fa-life-bouy icon-box"></i>fa-life-bouy<br>
<i class="fa fa-life-ring icon-box"></i>fa-life-ring<br>
<i class="fa fa-life-saver icon-box"></i>fa-life-saver<br>
<i class="fa fa-mortar-board icon-box"></i>fa-mortar-board<br>
<i class="fa fa-openid icon-box"></i>fa-openid<br>
<i class="fa fa-paper-plane icon-box"></i>fa-paper-plane<br>
<i class="fa fa-paper-plane-o icon-box"></i>fa-paper-plane-o<br>
<i class="fa fa-paragraph icon-box"></i>fa-paragraph<br>
<i class="fa fa-paw icon-box"></i>fa-paw<br>
<i class="fa fa-pied-piper icon-box"></i>fa-pied-piper<br>
<i class="fa fa-pied-piper-alt icon-box"></i>fa-pied-piper-alt<br>
<i class="fa fa-pied-piper-square icon-box"></i>fa-pied-piper-square<br>
<i class="fa fa-qq icon-box"></i>fa-qq<br>
<i class="fa fa-ra icon-box"></i>fa-ra<br>
<i class="fa fa-rebel icon-box"></i>fa-rebel<br>
<i class="fa fa-recycle icon-box"></i>fa-recycle<br>
<i class="fa fa-reddit icon-box"></i>fa-reddit<br>
<i class="fa fa-reddit-square icon-box"></i>fa-reddit-square<br>
<i class="fa fa-send icon-box"></i>fa-send<br>
<i class="fa fa-send-o icon-box"></i>fa-send-o<br>
<i class="fa fa-share-alt icon-box"></i>fa-share-alt<br>
<i class="fa fa-share-alt-square icon-box"></i>fa-share-alt-square<br>
<i class="fa fa-slack icon-box"></i>fa-slack<br>
<i class="fa fa-sliders icon-box"></i>fa-sliders<br>
<i class="fa fa-soundcloud icon-box"></i>fa-soundcloud<br>
<i class="fa fa-space-shuttle icon-box"></i>fa-space-shuttle<br>
<i class="fa fa-spoon icon-box"></i>fa-spoon<br>
<i class="fa fa-spotify icon-box"></i>fa-spotify<br>
<i class="fa fa-steam icon-box"></i>fa-steam<br>
<i class="fa fa-steam-square icon-box"></i>fa-steam-square<br>
<i class="fa fa-stumbleupon icon-box"></i>fa-stumbleupon<br>
<i class="fa fa-stumbleupon-circle icon-box"></i>fa-stumbleupon-circle<br>
<i class="fa fa-support icon-box"></i>fa-support<br>
<i class="fa fa-taxi icon-box"></i>fa-taxi<br>
<i class="fa fa-tencent-weibo icon-box"></i>fa-tencent-weibo<br>
<i class="fa fa-tree icon-box"></i>fa-tree<br>
<i class="fa fa-university icon-box"></i>fa-university<br>
<i class="fa fa-vine icon-box"></i>fa-vine<br>
<i class="fa fa-wechat icon-box"></i>fa-wechat<br>
<i class="fa fa-weixin icon-box"></i>fa-weixin<br>
<i class="fa fa-wordpress icon-box"></i>fa-wordpress<br>
<i class="fa fa-yahoo icon-box"></i>fa-yahoo<br>
</div>
</body>
</html>

161
t.php Normal file
View File

@ -0,0 +1,161 @@
<?php
require __DIR__ . '/vendor/autoload.php';
session_start();
function getClient()
{
$client = new Google_Client();
$client->setAuthConfig('credentials.json');
$client->addScope([
Google_Service_Drive::DRIVE,
'https://www.googleapis.com/auth/documents'
]);
$client->setRedirectUri('https://ms1crmdev.progiweb.net/t.php');
$client->setAccessType('offline');
$client->setPrompt('select_account consent');
// Authentification OAuth
if (isset($_GET['code'])) {
$token = $client->fetchAccessTokenWithAuthCode($_GET['code']);
if (isset($token['error'])) {
echo "Erreur Google: " . htmlspecialchars($token['error_description'] ?? $token['error']);
exit;
}
$_SESSION['access_token'] = $token;
header('Location: ' . filter_var($client->getRedirectUri(), FILTER_SANITIZE_URL));
exit;
}
if (isset($_SESSION['access_token'])
&& is_array($_SESSION['access_token'])
&& isset($_SESSION['access_token']['access_token'])
) {
$client->setAccessToken($_SESSION['access_token']);
} else {
$authUrl = $client->createAuthUrl();
header('Location: ' . filter_var($authUrl, FILTER_SANITIZE_URL));
exit;
}
if ($client->isAccessTokenExpired()) {
unset($_SESSION['access_token']);
$authUrl = $client->createAuthUrl();
header('Location: ' . filter_var($authUrl, FILTER_SANITIZE_URL));
exit;
}
return $client;
}
// ========== TEST ==========
// 1. La première fois, laisse $docIdTest = ""; pour créer le doc et afficher son ID
// 2. Ensuite, copie cet ID ici, dans $docIdTest, pour mettre à jour ce doc existant uniquement
$docIdTest = "106klQ1hXpQkq5VJwmWFQ74kvx6bg1KX1XZtS9Dv3s34"; // <-- Colle ici l'ID après la première création pour la mise à jour
if (isset($_POST['create_shortcut'])) {
$client = getClient();
$driveService = new Google_Service_Drive($client);
$folderId = '1BJPxQ2XPWqBRYxINgI-9TKJ_iPz7Dltb';
$titre = "Raccourci infos course";
$description= "zz2Consultez les résultats de lévénement. Pour toute question, contactez notre équipe.";
$lienTexte = "Lien vers les résultats du 24h Tremblant";
$lienURL = "https://ms1timing.com/index.php?code=results&id=631";
$contactTel = "Téléphone : 1-855-999-5555";
$texteDoc = $titre . "\n\n" . $description . "\n\n" . $lienTexte . "\n\n" . $contactTel;
$titreLen = strlen($titre);
$descLen = strlen($description);
$lienLen = strlen($lienTexte);
$lienStart = $titreLen + 2 + $descLen + 2;
$lienEnd = $lienStart + $lienLen;
$docsService = new Google_Service_Docs($client);
if (empty($docIdTest)) {
// Création du doc la première fois
$fileMetadata = new Google_Service_Drive_DriveFile([
'name' => $titre,
'mimeType' => 'application/vnd.google-apps.document',
'parents' => [$folderId],
]);
$file = $driveService->files->create($fileMetadata, [
'supportsAllDrives' => true,
]);
$docId = $file->id;
// Affiche l'ID à stocker pour la prochaine fois
echo "DOCUMENT CRÉÉ :<br>";
echo "Colle cet ID dans \$docIdTest pour les prochaines mises à jour :<br>";
echo "<b>" . htmlspecialchars($docId) . "</b><br><br>";
// Continue la création et remplissage du doc
} else {
$docId = $docIdTest;
}
// Insère ou remplace le contenu
try {
// Tente d'effacer tout le contenu existant (si le doc existait déjà)
$doc = $docsService->documents->get($docId);
$contentLength = 0;
if (isset($doc->body->content) && is_array($doc->body->content)) {
foreach ($doc->body->content as $el) {
if (isset($el->endIndex)) {
$contentLength = max($contentLength, $el->endIndex);
}
}
}
$requests = [];
// On efface le contenu SEULEMENT s'il y a quelque chose à effacer (>2)
if ($contentLength > 2) {
$requests[] = [
'deleteContentRange' => [
'range' => [
'startIndex' => 1,
'endIndex' => $contentLength - 1
]
]
];
}
$requests[] = [
'insertText' => [
'location' => ['index' => 1],
'text' => $texteDoc
]
];
$requests[] = [
'updateTextStyle' => [
'range' => [
'startIndex' => $lienStart,
'endIndex' => $lienEnd
],
'textStyle' => [
'link' => ['url' => $lienURL]
],
'fields' => 'link'
]
];
$batchUpdateRequest = new Google_Service_Docs_BatchUpdateDocumentRequest([
'requests' => $requests
]);
$docsService->documents->batchUpdate($docId, $batchUpdateRequest);
// Affiche le lien du Google Doc modifié ou créé
$docUrl = 'https://docs.google.com/document/d/' . $docId . '/edit';
echo "Raccourci Google Doc créé ou mis à jour!<br>";
echo "<a href='$docUrl' target='_blank'>Ouvrir le raccourci dans Google Drive</a>";
exit;
} catch (Exception $e) {
echo "Erreur lors de la mise à jour du document : " . htmlspecialchars($e->getMessage());
exit;
}
}
?>
<!-- HTML du bouton -->
<form method="POST">
<button type="submit" name="create_shortcut">Créer le raccourci Google Drive</button>
</form>

98
t2.php Normal file
View File

@ -0,0 +1,98 @@
<?php
require __DIR__ . '/vendor/autoload.php';
session_start();
function getClient()
{
$client = new Google_Client();
$client->setAuthConfig('credentials.json');
$client->addScope(Google_Service_Drive::DRIVE);
$client->setRedirectUri('https://ms1crmdev.progiweb.net/t2.php');
$client->setAccessType('offline');
$client->setPrompt('select_account consent');
if (isset($_GET['code'])) {
$token = $client->fetchAccessTokenWithAuthCode($_GET['code']);
if (isset($token['error'])) {
echo "Erreur Google: " . htmlspecialchars($token['error_description'] ?? $token['error']);
exit;
}
$_SESSION['access_token'] = $token;
header('Location: ' . filter_var($client->getRedirectUri(), FILTER_SANITIZE_URL));
exit;
}
if (isset($_SESSION['access_token'])
&& is_array($_SESSION['access_token'])
&& isset($_SESSION['access_token']['access_token'])
) {
$client->setAccessToken($_SESSION['access_token']);
} else {
$authUrl = $client->createAuthUrl();
header('Location: ' . filter_var($authUrl, FILTER_SANITIZE_URL));
exit;
}
if ($client->isAccessTokenExpired()) {
unset($_SESSION['access_token']);
$authUrl = $client->createAuthUrl();
header('Location: ' . filter_var($authUrl, FILTER_SANITIZE_URL));
exit;
}
return $client;
}
$parentFolderId = '1BJPxQ2XPWqBRYxINgI-9TKJ_iPz7Dltb'; // Dossier parent
$driveId = '0AChhcY8763myUk9PVA';
$client = getClient();
$driveService = new Google_Service_Drive($client);
$selectedFolderId = $_POST['folder_id'] ?? null;
// Récupère SEULEMENT les dossiers enfants
$query = sprintf(
"'%s' in parents and trashed = false and mimeType = 'application/vnd.google-apps.folder'",
$parentFolderId
);
$folders = [];
$pageToken = null;
do {
$params = [
'q' => $query,
'fields' => 'nextPageToken, files(id, name, mimeType)',
'supportsAllDrives' => true,
'includeItemsFromAllDrives' => true,
'corpora' => 'drive',
'driveId' => $driveId,
'pageSize' => 1000,
];
if ($pageToken) {
$params['pageToken'] = $pageToken;
}
$results = $driveService->files->listFiles($params);
foreach ($results->files as $file) {
$folders[] = $file;
}
$pageToken = $results->getNextPageToken();
} while ($pageToken);
// Debug : Affiche le compte connecté
$about = $driveService->about->get(['fields' => 'user']);
echo "<b>Connecté comme :</b> " . htmlspecialchars($about->user->displayName) . " (" . htmlspecialchars($about->user->emailAddress) . ")<br><br>";
// Affiche le select
echo '<form method="POST">';
echo '<label for="folder_id">Choisissez un répertoire :</label> ';
echo '<select name="folder_id" id="folder_id" onchange="this.form.submit()">';
echo '<option value="">-- Choisir un dossier --</option>';
foreach ($folders as $folder) {
$selected = ($selectedFolderId == $folder->id) ? 'selected' : '';
echo '<option value="' . htmlspecialchars($folder->id) . '" ' . $selected . '>' . htmlspecialchars($folder->name) . '</option>';
}
echo '</select>';
echo '</form>';
// Affiche l'ID du dossier sélectionné (pour démo)
if ($selectedFolderId) {
echo '<h3>ID du dossier sélectionné :</h3><pre>' . htmlspecialchars($selectedFolderId) . '</pre>';
}
?>

173
t3.php Normal file
View File

@ -0,0 +1,173 @@
<?php
$email = 'info@ultratrailfjord.com';
$liste = jira_get_tickets_by_email($email);
if ($liste['success']) {
foreach ($liste['tickets'] as $ticket) {
echo '<a href="' . $ticket['url'] . '" target="_blank">' . $ticket['key'] . ' - ' . $ticket['summary'] . ' (' . $ticket['status'] . ')</a><br>';
}
} else {
echo 'Erreur : ' . $liste['message'];
}
/**
* Recherche tous les tickets JIRA ouverts dun utilisateur selon son courriel (ou accountId)
* Compatible avec le nouvel endpoint /rest/api/3/search/jql
*/
function jira_get_tickets_by_email($email)
{
$jiraDomain = 'https://progiwebinc.atlassian.net';
$userEmail = 'stephan@progiweb.ca';
$apiToken = 'ATATT3xFfGF0DuhOhRUxFlj2hFpLuzYGapJIrhMETB35NnLFi1TyxDszp3tTa8MaadTpT72GfDk9FOpDm07m6HbdXoQ9plDeRvB6OwRnD19VrIqA8M3HmDGgf_MWR7Pwk5731ahbgb4UBdRgj-ICBqt9A0SjJPnnoTfu4ECVh51HjM0RsekOmeM=908B030C';
$projectKey = 'SM';
// 1) Résoudre l'accountId à partir de l'email
$accountId = jira_find_account_id_by_email($jiraDomain, $userEmail, $apiToken, $email);
// 2) Construire le ou les JQL à tester (accountId en priorité)
$jqls = [];
if ($accountId) {
$jqls[] = 'project = ' . $projectKey . ' AND reporter = ' . $accountId . ' ORDER BY created DESC';
}
$jqls[] = 'project = ' . $projectKey . ' AND reporter = "' . addslashes($email) . '" ORDER BY created DESC';
// 3) Interroger le nouvel endpoint /rest/api/3/search/jql (POST)
$headers = [
'Authorization: Basic ' . base64_encode("$userEmail:$apiToken"),
'Content-Type: application/json',
'Accept: application/json'
];
$fieldsWanted = ["summary","status"];
$maxPerPage = 100;
$tickets = [];
$usedJql = null;
$lastErr = null;
foreach ($jqls as $jql) {
$tickets = [];
$usedJql = $jql;
$nextPageToken = null;
do {
$payload = [
"jql" => $jql,
"maxResults" => $maxPerPage,
"fields" => $fieldsWanted
];
if ($nextPageToken) {
$payload["nextPageToken"] = $nextPageToken;
}
$ch = curl_init($jiraDomain . '/rest/api/3/search/jql');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE));
$response = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$curlErr = curl_error($ch);
curl_close($ch);
if ($httpcode !== 200) {
$lastErr = "HTTP $httpcode - " . ($response ?: $curlErr ?: 'Erreur inconnue');
$tickets = [];
break;
}
$data = json_decode($response, true);
if (!isset($data['issues'])) {
$lastErr = 'Réponse inattendue du service de recherche.';
$tickets = [];
break;
}
foreach ($data['issues'] as $issue) {
$tickets[] = [
'key' => $issue['key'],
'summary' => $issue['fields']['summary'] ?? '',
'status' => $issue['fields']['status']['name'] ?? '',
'url' => $jiraDomain . '/browse/' . $issue['key']
];
}
// pagination nouvelle API : token ou fin de résultats
$nextPageToken = $data['nextPageToken'] ?? null;
} while ($nextPageToken);
if (!empty($tickets)) {
break;
}
}
if (!empty($tickets)) {
return ['success' => true, 'tickets' => $tickets];
}
return [
'success' => false,
'message' => $lastErr ?: "Aucun ticket trouvé (JQL testé : $usedJql)"
];
}
/**
* Recherche laccountId dun utilisateur à partir de son email.
*/
function jira_find_account_id_by_email($jiraDomain, $userEmail, $apiToken, $email)
{
$headers = [
'Authorization: Basic ' . base64_encode("$userEmail:$apiToken"),
'Accept: application/json'
];
$url = $jiraDomain . '/rest/api/3/user/search?query=' . urlencode($email);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpcode !== 200) {
return null;
}
$users = json_decode($response, true);
if (is_array($users) && count($users) > 0) {
foreach ($users as $u) {
if (!empty($u['emailAddress']) && strcasecmp($u['emailAddress'], $email) === 0) {
return $u['accountId'] ?? null;
}
}
return $users[0]['accountId'] ?? null;
}
return null;
}
/**
* (Optionnel) Exemple pour lister les projets disponibles.
*/
function jira_get_projects()
{
$jiraDomain = 'https://progiwebinc.atlassian.net';
$userEmail = 'stephan@progiweb.ca';
$apiToken = 'ATATT...';
$ch = curl_init($jiraDomain . '/rest/api/3/project/search');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Basic ' . base64_encode("$userEmail:$apiToken"),
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}

71
test.php Normal file
View File

@ -0,0 +1,71 @@
<?php
//initilize the pagedfgfdgfdgfddssd
require_once 'init.web.php';
/*---------------- PHP Custom Scripts ---------
YOU CAN SET CONFIGURATION VARIABLES HERE BEFORE IT GOES TO NAV, RIBBON, ETC.
E.G. $page_title = "Custom Title" */
$page_title = "Blank Page";
/* ---------------- END PHP Custom Scripts ------------- */
//include header
//you can add your custom css in $page_css array.
//Note: all css files are inside css/ folder
$page_css[] = "your_style.css";
include("inc/header.php");
//include left panel (navigation)
//follow the tree in inc/config.ui.php
$page_nav["misc"]["sub"]["blank"]["active"] = true;
include("inc/nav.php");
?>
<!-- ==========================CONTENT STARTS HERE ========================== -->
<!-- MAIN PANEL -->
<div id="main" role="main">
<?php
//configure ribbon (breadcrumbs) array("name"=>"url"), leave url empty if no url
//$breadcrumbs["New Crumb"] => "http://url.com"
$breadcrumbs["Misc"] = "";
include("inc/ribbon.php");
?>
<!-- MAIN CONTENT -->
<div id="content">
</div>
<!-- END MAIN CONTENT -->
</div>
<!-- END MAIN PANEL -->
<!-- ==========================CONTENT ENDS HERE ========================== -->
<?php
// include page footer
include("inc/footer.php");
?>
<?php
//include required scripts
include("inc/scripts.php");
?>
<!-- PAGE RELATED PLUGIN(S)
<script src="..."></script>-->
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<script>
$(document).ready(function() {
// PAGE RELATED SCRIPTS
})
</script>
<?php
//include footer
include("inc/google-analytics.php");
?>

29
test_autoload.php Normal file
View File

@ -0,0 +1,29 @@
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Common\Util;
echo "<pre>";
if (!class_exists('Common\Util')) {
echo "❌ La classe Common\\Util n'est pas chargée." . PHP_EOL;
echo "📁 Chemin courant : " . __DIR__ . PHP_EOL;
echo "📄 Autoloader chargé : " . (file_exists(__DIR__ . '/vendor/autoload.php') ? 'oui' : 'non') . PHP_EOL;
echo "🧠 Liste partielle des classes déclarées : " . PHP_EOL;
print_r(array_filter(get_declared_classes(), fn($c) => str_starts_with($c, 'Common')));
exit;
}
echo "✅ Classe Common\\Util chargée." . PHP_EOL;
if (method_exists('Common\Util', 'is_cli')) {
echo "✅ Méthode is_cli() détectée." . PHP_EOL;
if (Util::is_cli()) {
echo "🖥️ Exécuté en CLI." . PHP_EOL;
} else {
echo "🌐 Exécuté via navigateur web." . PHP_EOL;
}
} else {
echo "❌ Méthode is_cli() non trouvée.";
}

135
test_calendar_sa.php Normal file
View File

@ -0,0 +1,135 @@
<?php
// CONFIG — adapte juste cet email:
$impersonate = 'leith.s@ms1timing.com'; // l'utilisateur MS1 à impersonnifier
$jsonPath = __DIR__ . '/application/credentials/service_account.json';
// ---- Helpers ----
function b64url($data)
{
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
function http_post_json($url, $fields)
{
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/x-www-form-urlencoded'],
CURLOPT_POSTFIELDS => http_build_query($fields),
CURLOPT_TIMEOUT => 30,
]);
$res = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($res === false) {
throw new Exception('cURL error: ' . curl_error($ch));
}
curl_close($ch);
return [$code, $res];
}
function http_get_auth($url, $bearer)
{
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $bearer],
CURLOPT_TIMEOUT => 30,
]);
$res = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($res === false) {
throw new Exception('cURL error: ' . curl_error($ch));
}
curl_close($ch);
return [$code, $res];
}
// ---- 1) Charger la clé de service ----
if (!file_exists($jsonPath)) die("Fichier JSON introuvable: $jsonPath\n");
$creds = json_decode(file_get_contents($jsonPath), true);
if (!$creds) die("Impossible de parser le JSON\n");
$client_email = $creds['client_email'];
$private_key = $creds['private_key'];
$token_uri = isset($creds['token_uri']) ? $creds['token_uri'] : 'https://oauth2.googleapis.com/token';
// ---- 2) Construire le JWT (RS256) ----
// Scopes minimum lecture/écriture dévénements:
$scope = 'https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/calendar.events';
$now = time();
$exp = $now + 3600; // 1h
$iss = $client_email;
$sub = $impersonate; // <- impersonation (DWD)
$aud = $token_uri;
$header = ['alg' => 'RS256', 'typ' => 'JWT'];
$claim = [
'iss' => $iss,
'scope' => $scope,
'aud' => $aud,
'exp' => $exp,
'iat' => $now,
'sub' => $sub
];
$jwt_unsigned = b64url(json_encode($header)) . '.' . b64url(json_encode($claim));
// Signer avec la clé privée
$signature = '';
$ok = openssl_sign($jwt_unsigned, $signature, $private_key, 'sha256WithRSAEncryption');
if (!$ok) {
die("Échec openssl_sign(). Vérifie la private_key.\n");
}
$jwt = $jwt_unsigned . '.' . b64url($signature);
// ---- 3) Échanger le JWT contre un access_token ----
list($code, $body) = http_post_json($token_uri, [
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer',
'assertion' => $jwt
]);
if ($code !== 200) {
echo "Échec token ($code): $body\n";
exit(1);
}
$tok = json_decode($body, true);
$access_token = $tok['access_token'] ?? null;
if (!$access_token) {
die("Pas d'access_token dans la réponse.\n");
}
echo "OK token reçu.\n";
// ---- 4) Appel test non destructif : lister les agendas de l'utilisateur ----
$url = 'https://www.googleapis.com/calendar/v3/users/me/calendarList';
list($code2, $body2) = http_get_auth($url, $access_token);
echo "GET calendarList => HTTP $code2\n";
echo $body2 . "\n";
// ---- 5) Créer un petit événement de test (dans primary) ----
$event = [
'summary' => 'Test CRM↔Google',
'description' => 'Évènement de validation DWD',
'start' => ['dateTime' => date('c', time()+3600)], // +1h
'end' => ['dateTime' => date('c', time()+7200)], // +2h
];
$ch = curl_init('https://www.googleapis.com/calendar/v3/calendars/primary/events');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$access_token,
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($event),
CURLOPT_TIMEOUT => 30,
]);
$resp = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "POST event => HTTP $code\n$resp\n";

View File

@ -0,0 +1,62 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\DiscoveryEngine;
class GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext extends \Google\Model
{
/**
* @var string
*/
public $content;
/**
* @var string
*/
public $pageIdentifier;
/**
* @param string
*/
public function setContent($content)
{
$this->content = $content;
}
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* @param string
*/
public function setPageIdentifier($pageIdentifier)
{
$this->pageIdentifier = $pageIdentifier;
}
/**
* @return string
*/
public function getPageIdentifier()
{
return $this->pageIdentifier;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext::class, 'Google_Service_DiscoveryEngine_GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext');

View File

@ -0,0 +1,62 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\DiscoveryEngine;
class GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer extends \Google\Model
{
/**
* @var string
*/
public $content;
/**
* @var string
*/
public $pageIdentifier;
/**
* @param string
*/
public function setContent($content)
{
$this->content = $content;
}
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* @param string
*/
public function setPageIdentifier($pageIdentifier)
{
$this->pageIdentifier = $pageIdentifier;
}
/**
* @return string
*/
public function getPageIdentifier()
{
return $this->pageIdentifier;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer::class, 'Google_Service_DiscoveryEngine_GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer');

View File

@ -0,0 +1,62 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\DiscoveryEngine;
class GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment extends \Google\Model
{
/**
* @var string
*/
public $content;
/**
* @var string
*/
public $pageIdentifier;
/**
* @param string
*/
public function setContent($content)
{
$this->content = $content;
}
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* @param string
*/
public function setPageIdentifier($pageIdentifier)
{
$this->pageIdentifier = $pageIdentifier;
}
/**
* @return string
*/
public function getPageIdentifier()
{
return $this->pageIdentifier;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment::class, 'Google_Service_DiscoveryEngine_GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment');