├── .gitignore ├── composer.json ├── .DS_Store ├── favicon.ico ├── css ├── .DS_Store ├── sage.css └── sagebenj.css ├── img ├── .DS_Store ├── header-bg.jpg ├── sage-logo.png └── header-bg2.jpg ├── X3 └── PATCH_X3 │ └── V12.zip ├── bootstrap ├── .DS_Store ├── assets │ ├── .DS_Store │ └── css │ │ └── .DS_Store ├── bootstrap │ ├── .DS_Store │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ └── npm.js ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 └── js │ └── npm.js ├── docimg ├── mutation.png └── query_list.png ├── readme-img ├── image-1.png ├── image-2.png ├── image-3.png ├── image-4.png ├── image-5.png ├── image-6.png ├── image-7.png ├── image-8.png └── image.png ├── WebServiceSOAP ├── .DS_Store ├── modelWS │ ├── ModelWS.php │ ├── CAdxMessage.php │ ├── CAdxParamKeyValue.php │ ├── CAdxCallContext.php │ ├── CAdxResultXml.php │ ├── CAdxTechnicalInfos.php │ ├── CAdxWebServiceXmlCCService.php │ └── ModelX3.php └── models │ ├── Connect.php │ ├── stock.php │ ├── Order.php │ └── Product.php ├── docker └── php │ ├── conf │ ├── readme-get-custom-Root-CA.crt.MD │ ├── vhost.conf │ └── apache.conf │ └── Dockerfile ├── font-awesome ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── font-awesome │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── less │ │ ├── screen-reader.less │ │ ├── fixed-width.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── core.less │ │ ├── stacked.less │ │ ├── font-awesome.less │ │ ├── bordered-pulled.less │ │ ├── rotated-flipped.less │ │ ├── path.less │ │ ├── animated.less │ │ └── mixins.less │ ├── scss │ │ ├── _fixed-width.scss │ │ ├── _screen-reader.scss │ │ ├── _larger.scss │ │ ├── _list.scss │ │ ├── _core.scss │ │ ├── font-awesome.scss │ │ ├── _stacked.scss │ │ ├── _bordered-pulled.scss │ │ ├── _rotated-flipped.scss │ │ ├── _path.scss │ │ ├── _animated.scss │ │ └── _mixins.scss │ └── HELP-US-OUT.txt ├── less │ ├── fixed-width.less │ ├── screen-reader.less │ ├── larger.less │ ├── list.less │ ├── core.less │ ├── stacked.less │ ├── font-awesome.less │ ├── bordered-pulled.less │ ├── rotated-flipped.less │ ├── path.less │ ├── animated.less │ └── mixins.less ├── scss │ ├── _fixed-width.scss │ ├── _screen-reader.scss │ ├── _larger.scss │ ├── _list.scss │ ├── _core.scss │ ├── font-awesome.scss │ ├── _stacked.scss │ ├── _bordered-pulled.scss │ ├── _rotated-flipped.scss │ ├── _path.scss │ ├── _animated.scss │ └── _mixins.scss └── HELP-US-OUT.txt ├── doc ├── pdf │ └── Create_a_WebPortal_SageX3_WebServices_ENG.pdf └── docx │ └── Create_a_WebPortal_SageX3_WebServices_ENG.docx ├── vendor ├── firebase │ └── php-jwt │ │ ├── src │ │ ├── SignatureInvalidException.php │ │ ├── ExpiredException.php │ │ ├── BeforeValidException.php │ │ ├── JWTExceptionWithPayloadInterface.php │ │ ├── Key.php │ │ └── CachedKeySet.php │ │ ├── composer.json │ │ └── LICENSE ├── composer │ ├── autoload_namespaces.php │ ├── autoload_psr4.php │ ├── autoload_classmap.php │ ├── platform_check.php │ ├── LICENSE │ ├── autoload_static.php │ ├── installed.php │ ├── autoload_real.php │ └── installed.json └── autoload.php ├── GraphQL ├── PurchaseReceipt_mutation.graphql ├── PurchaseReceipt_query.graphql ├── PurchaseOrder_query.graphql ├── DisplayTokenJWT.php ├── PurchaseReceipt_read.graphql ├── PurchaseOrder_read.graphql ├── ModelGraphQLX3.php └── PurchaseReceipt.php ├── docker-compose.yml ├── ws_get_token.php ├── tools-api ├── consolePHP.php └── ToolsWS.php ├── js ├── sage.js ├── agency.js ├── cbpAnimatedHeader.js ├── classie.js └── non_utilise_contact_me.js ├── includes ├── end_body.php ├── head.php └── menu_home.php ├── config └── Config_template.php ├── index.php ├── authentication └── JWT │ └── TokenJWT.php ├── page_itm_list.php ├── page_soh_list.php ├── logout_action.php ├── page_get_token.php ├── connexion_action.php ├── connexion.php ├── page_itm_read.php ├── composer.lock ├── page_soh_read.php ├── page_pth_gq_read.php ├── page_stock_list.php ├── page_soh_create_action.php ├── page_poh_gq_list.php ├── page_soh_create.php ├── page_poh_gq_read.php └── WebService └── modelWS └── ModelX3.php /.gitignore: -------------------------------------------------------------------------------- 1 | config/Config.php 2 | docker/php/conf/*.crt 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "firebase/php-jwt": "^6.10" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/.DS_Store -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/favicon.ico -------------------------------------------------------------------------------- /css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/css/.DS_Store -------------------------------------------------------------------------------- /img/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/img/.DS_Store -------------------------------------------------------------------------------- /img/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/img/header-bg.jpg -------------------------------------------------------------------------------- /img/sage-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/img/sage-logo.png -------------------------------------------------------------------------------- /X3/PATCH_X3/V12.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/X3/PATCH_X3/V12.zip -------------------------------------------------------------------------------- /bootstrap/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/bootstrap/.DS_Store -------------------------------------------------------------------------------- /docimg/mutation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/docimg/mutation.png -------------------------------------------------------------------------------- /img/header-bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/img/header-bg2.jpg -------------------------------------------------------------------------------- /docimg/query_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/docimg/query_list.png -------------------------------------------------------------------------------- /readme-img/image-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image-1.png -------------------------------------------------------------------------------- /readme-img/image-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image-2.png -------------------------------------------------------------------------------- /readme-img/image-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image-3.png -------------------------------------------------------------------------------- /readme-img/image-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image-4.png -------------------------------------------------------------------------------- /readme-img/image-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image-5.png -------------------------------------------------------------------------------- /readme-img/image-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image-6.png -------------------------------------------------------------------------------- /readme-img/image-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image-7.png -------------------------------------------------------------------------------- /readme-img/image-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image-8.png -------------------------------------------------------------------------------- /readme-img/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/readme-img/image.png -------------------------------------------------------------------------------- /WebServiceSOAP/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/WebServiceSOAP/.DS_Store -------------------------------------------------------------------------------- /bootstrap/assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/bootstrap/assets/.DS_Store -------------------------------------------------------------------------------- /bootstrap/bootstrap/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/bootstrap/bootstrap/.DS_Store -------------------------------------------------------------------------------- /bootstrap/assets/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/bootstrap/assets/css/.DS_Store -------------------------------------------------------------------------------- /docker/php/conf/readme-get-custom-Root-CA.crt.MD: -------------------------------------------------------------------------------- 1 | # Get Root.CA.crt 2 | 3 | Open internet browser and get the ca.crt ( download file) 4 | -------------------------------------------------------------------------------- /font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /font-awesome/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /font-awesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /font-awesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /doc/pdf/Create_a_WebPortal_SageX3_WebServices_ENG.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/doc/pdf/Create_a_WebPortal_SageX3_WebServices_ENG.pdf -------------------------------------------------------------------------------- /font-awesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /doc/docx/Create_a_WebPortal_SageX3_WebServices_ENG.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/doc/docx/Create_a_WebPortal_SageX3_WebServices_ENG.docx -------------------------------------------------------------------------------- /font-awesome/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /font-awesome/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /font-awesome/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /font-awesome/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sage-ERP-X3/sample-x3-ws-php-webportal/HEAD/font-awesome/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /font-awesome/font-awesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /vendor/firebase/php-jwt/src/SignatureInvalidException.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /docker/php/conf/vhost.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerAdmin olivier@sage.com 3 | 4 | DocumentRoot /app 5 | 6 | ErrorLog ${APACHE_LOG_DIR}/error.log 7 | CustomLog ${APACHE_LOG_DIR}/access.log combined 8 | 9 | -------------------------------------------------------------------------------- /GraphQL/PurchaseReceipt_mutation.graphql: -------------------------------------------------------------------------------- 1 | mutation mySpeCreate($data: PurchaseReceipt_Input!) { 2 | x3Purchasing { 3 | purchaseReceipt { 4 | create(data: $data) { 5 | id 6 | } 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | php-dev: 3 | build: 4 | context: ./docker/php 5 | dockerfile: Dockerfile 6 | target: dev-default 7 | volumes: 8 | - ./:/app 9 | ports: 10 | - 80:80 11 | volumes: 12 | .: 13 | -------------------------------------------------------------------------------- /vendor/composer/autoload_psr4.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/firebase/php-jwt/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /vendor/composer/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/composer/InstalledVersions.php', 10 | ); 11 | -------------------------------------------------------------------------------- /ws_get_token.php: -------------------------------------------------------------------------------- 1 | getTokenWS()); 7 | //ToolsWS::printSucces ( $jwtToken->getToken() ); 8 | 9 | 10 | ?> -------------------------------------------------------------------------------- /docker/php/conf/apache.conf: -------------------------------------------------------------------------------- 1 | 2 | Options -Indexes +FollowSymLinks 3 | AllowOverride None 4 | Require all granted 5 | #SetEnvIf X_FORWARDED_PROTO https HTTPS=on 6 | 7 | #ServerTokens Prod 8 | #ServerSignature Off 9 | #LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 10 | 11 | 12 | -------------------------------------------------------------------------------- /font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /font-awesome/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /WebServiceSOAP/modelWS/CAdxMessage.php: -------------------------------------------------------------------------------- 1 | '; 9 | $js_code .= 'console.log(' . json_encode($context, JSON_HEX_TAG) . ');'; 10 | 11 | $js_code .= 'console.log(' . json_encode($output, JSON_HEX_TAG) . ');'; 12 | $js_code .= ''; 13 | echo $js_code; 14 | 15 | } 16 | ?> -------------------------------------------------------------------------------- /vendor/firebase/php-jwt/src/ExpiredException.php: -------------------------------------------------------------------------------- 1 | payload = $payload; 12 | } 13 | 14 | public function getPayload(): object 15 | { 16 | return $this->payload; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /font-awesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /font-awesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/firebase/php-jwt/src/BeforeValidException.php: -------------------------------------------------------------------------------- 1 | payload = $payload; 12 | } 13 | 14 | public function getPayload(): object 15 | { 16 | return $this->payload; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WebServiceSOAP/models/Connect.php: -------------------------------------------------------------------------------- 1 | login = $login; 8 | $this->passwd = $passwd; 9 | } 10 | 11 | public function isConnect() { 12 | $ret = false; 13 | 14 | if ($this->login == Config::$WEB_SITE_LOGIN && $this->passwd == Config::$WEB_SITE_PASSWD) { 15 | $ret = true; 16 | } 17 | return $ret; 18 | } 19 | } 20 | ?> -------------------------------------------------------------------------------- /font-awesome/font-awesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /vendor/firebase/php-jwt/src/JWTExceptionWithPayloadInterface.php: -------------------------------------------------------------------------------- 1 | li>a:hover, .dropdown-menu>li>a:focus { 6 | background-color: #000000; 7 | } 8 | 9 | header .intro-text .intro-heading { 10 | font-size: 40px; 11 | } 12 | 13 | @media ( min-width :768px) { 14 | header .intro-text { 15 | padding-top: 70px; 16 | padding-bottom: 10px; 17 | } 18 | header .intro-text .intro-lead-in { 19 | font-size: 20px; 20 | } 21 | header .intro-text .intro-heading { 22 | margin-bottom: 10px; 23 | font-size: 40px; 24 | } 25 | } -------------------------------------------------------------------------------- /font-awesome/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /bootstrap/bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /font-awesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /font-awesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /css/sagebenj.css: -------------------------------------------------------------------------------- 1 | .dropdown-menu { 2 | background-color: #000000; 3 | } 4 | 5 | .dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus { 6 | background-color: #000000; 7 | } 8 | 9 | header .intro-text .intro-heading { 10 | font-size: 40px; 11 | } 12 | 13 | @media ( min-width :768px) { 14 | header .intro-text { 15 | padding-top: 70px; 16 | padding-bottom: 10px; 17 | } 18 | header .intro-text .intro-lead-in { 19 | font-size: 20px; 20 | font-style: normal; 21 | } 22 | header .intro-text .intro-heading { 23 | margin-bottom: 10px; 24 | font-size: 40px; 25 | font-style: normal; 26 | } 27 | } -------------------------------------------------------------------------------- /font-awesome/font-awesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /GraphQL/PurchaseReceipt_query.graphql: -------------------------------------------------------------------------------- 1 | query mySpeList($filter: String, $orderBy: String) { 2 | x3Purchasing { 3 | purchaseReceiptLine { 4 | query(filter: $filter, orderBy: $orderBy) { 5 | edges { 6 | node { 7 | receiptSite { 8 | _id 9 | name 10 | } 11 | _id 12 | lineNumber 13 | receiptDate 14 | supplier { 15 | _id 16 | } 17 | purchaseOrder { 18 | _id 19 | } 20 | } 21 | } 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WebServiceSOAP/modelWS/CAdxCallContext.php: -------------------------------------------------------------------------------- 1 | status = $status; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /GraphQL/DisplayTokenJWT.php: -------------------------------------------------------------------------------- 1 | getToken(); 13 | 14 | $str=''; 15 | 16 | $str .= "
"; 17 | 18 | $str.=''; 21 | $str .= "
"; 22 | return $str; 23 | } 24 | 25 | function getTokenWS() { 26 | 27 | $jwt = new TokenJWT (); 28 | $token = $jwt->getToken(); 29 | return $token; 30 | } 31 | 32 | 33 | } 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /GraphQL/PurchaseReceipt_read.graphql: -------------------------------------------------------------------------------- 1 | query mySpeDetail($id: Id!) { 2 | x3Purchasing { 3 | purchaseReceipt { 4 | read(_id: $id) { 5 | id 6 | receiptSite { 7 | _id 8 | name 9 | } 10 | receiptDate 11 | supplier { 12 | _id 13 | } 14 | lines { 15 | query { 16 | edges { 17 | node { 18 | _id 19 | lineNumber 20 | purchaseOrder { 21 | id 22 | } 23 | purchaseOrderLine { 24 | lineNumber 25 | sequenceNumber 26 | } 27 | quantityInReceiptUnitReceived 28 | } 29 | } 30 | } 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /tools-api/ToolsWS.php: -------------------------------------------------------------------------------- 1 | '; 6 | $ret.='×'; 7 | //$ret.='Erreur! '; 8 | $ret.=$error; 9 | $ret.=''; 10 | return $ret; 11 | } 12 | static function getSucces($mess) { 13 | $ret=""; 14 | $ret.='
'; 15 | $ret.='×'; 16 | //$ret.='Succes! '; 17 | $ret.=$mess; 18 | $ret.='
'; 19 | return $ret; 20 | } 21 | 22 | static function printError($error) { 23 | echo ToolsWS::getError($error); 24 | } 25 | static function printSucces($mess) { 26 | echo ToolsWS::getSucces($mess); 27 | } 28 | } 29 | ?> 30 | 31 | -------------------------------------------------------------------------------- /js/sage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sage 3 | */ 4 | 5 | function addLigne(idtable) { 6 | $('#'+idtable+' tbody>tr:last').clone(true).insertAfter('#'+idtable+' tbody>tr:last'); 7 | $ 8 | 9 | } 10 | 11 | //function removeLigne(idtable) { 12 | //$('#'+idtable+' tbody>tr:last').clone(true).insertAfter('#'+idtable+' tbody>tr:last'); 13 | // $('#'+idtable).remove(); 14 | 15 | //} 16 | 17 | function removeLigne(idtable,row) 18 | { 19 | var i=row.parentNode.parentNode.rowIndex; 20 | document.getElementById(idtable).deleteRow(i); 21 | } 22 | 23 | function set_icon_connect(isConnect) { 24 | 25 | if (isConnect==0) { 26 | $('#icon-connect').attr("class","hide"); 27 | $('#icon-deconnect').attr("class","hide"); 28 | 29 | } else { 30 | $('#icon-connect').attr("class",""); 31 | $('#icon-deconnect').attr("class",""); 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /font-awesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /font-awesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/autoload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /vendor/composer/platform_check.php: -------------------------------------------------------------------------------- 1 | = 70400)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | if ($issues) { 12 | if (!headers_sent()) { 13 | header('HTTP/1.1 500 Internal Server Error'); 14 | } 15 | if (!ini_get('display_errors')) { 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18 | } elseif (!headers_sent()) { 19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; 20 | } 21 | } 22 | trigger_error( 23 | 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 | E_USER_ERROR 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /js/cbpAnimatedHeader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * cbpAnimatedHeader.js v1.0.0 3 | * http://www.codrops.com 4 | * 5 | * Licensed under the MIT license. 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * 8 | * Copyright 2013, Codrops 9 | * http://www.codrops.com 10 | */ 11 | var cbpAnimatedHeader = (function() { 12 | 13 | var docElem = document.documentElement, 14 | header = document.querySelector( '.navbar-default' ), 15 | didScroll = false, 16 | changeHeaderOn = 300; 17 | 18 | function init() { 19 | window.addEventListener( 'scroll', function( event ) { 20 | if( !didScroll ) { 21 | didScroll = true; 22 | setTimeout( scrollPage, 250 ); 23 | } 24 | }, false ); 25 | } 26 | 27 | function scrollPage() { 28 | var sy = scrollY(); 29 | if ( sy >= changeHeaderOn ) { 30 | classie.add( header, 'navbar-shrink' ); 31 | } 32 | else { 33 | classie.remove( header, 'navbar-shrink' ); 34 | } 35 | didScroll = false; 36 | } 37 | 38 | function scrollY() { 39 | return window.pageYOffset || docElem.scrollTop; 40 | } 41 | 42 | init(); 43 | 44 | })(); -------------------------------------------------------------------------------- /GraphQL/PurchaseOrder_read.graphql: -------------------------------------------------------------------------------- 1 | query mySpeDetail($id: Id!) { 2 | x3Purchasing { 3 | purchaseOrder { 4 | read(_id: $id) { 5 | _id 6 | purchaseSite { 7 | name 8 | _id 9 | } 10 | receiptSite { 11 | name 12 | } 13 | orderFromSupplier { 14 | code { 15 | code 16 | } 17 | } 18 | internalOrderReference 19 | receiptStatus 20 | signatureStatus 21 | isClosed 22 | _createStamp 23 | _updateStamp 24 | purchaseOrderLines { 25 | query { 26 | edges { 27 | node { 28 | lineNumber 29 | product { 30 | code 31 | description1 32 | } 33 | quantityInOrderUnitOrdered 34 | quantityInStockUnitReceived 35 | orderUnit { 36 | code 37 | } 38 | } 39 | } 40 | } 41 | } 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /config/Config_template.php: -------------------------------------------------------------------------------- 1 | /" Not right 10 | #public static $WEB_SERVER_X3 = "http://"; 11 | public static $WEB_SERVER_X3 = "http://"; 12 | 13 | /* 14 | Config SOAP Web services X3 15 | */ 16 | 17 | public static $CODE_LANG = "ENG"; 18 | public static $POOL_ALIAS = "..."; 19 | public static $WS_ORDER = "YOSOH"; 20 | public static $WS_STOCK = "YSTOCK_LOT"; 21 | public static $WS_PRODUCT = "YOITM"; 22 | 23 | /* 24 | Config GraphQL X3 25 | */ 26 | 27 | public static $GQL_ENDPOINT = "..."; 28 | 29 | /* 30 | Config PHP Web Portal 31 | */ 32 | 33 | public static $WEB_SITE_LOGIN = "websage"; 34 | public static $WEB_SITE_PASSWD = "websage"; 35 | 36 | public static $WEB_SITE_CONSOLE = false; 37 | 38 | /* 39 | Config JWT 40 | */ 41 | 42 | public static $JWT_CLIENT_ID = "..."; 43 | public static $JWT_SECRET_OR_PRIVATE_KEY = "..."; 44 | public static $JWT_AUDIENCE = ""; 45 | public static $JWT_USER = "..."; 46 | } 47 | ?> 48 | -------------------------------------------------------------------------------- /vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'Firebase\\JWT\\' => 13, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'Firebase\\JWT\\' => 18 | array ( 19 | 0 => __DIR__ . '/..' . '/firebase/php-jwt/src', 20 | ), 21 | ); 22 | 23 | public static $classMap = array ( 24 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 25 | ); 26 | 27 | public static function getInitializer(ClassLoader $loader) 28 | { 29 | return \Closure::bind(function () use ($loader) { 30 | $loader->prefixLengthsPsr4 = ComposerStaticInit7dc13b8af5d2ef4b490ed0fa43f381ec::$prefixLengthsPsr4; 31 | $loader->prefixDirsPsr4 = ComposerStaticInit7dc13b8af5d2ef4b490ed0fa43f381ec::$prefixDirsPsr4; 32 | $loader->classMap = ComposerStaticInit7dc13b8af5d2ef4b490ed0fa43f381ec::$classMap; 33 | 34 | }, null, ClassLoader::class); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /WebServiceSOAP/models/stock.php: -------------------------------------------------------------------------------- 1 | CAdxResultXml = $this->run ( Config::$WS_STOCK, $WS ); 6 | $result = $this->CAdxResultXml->resultXml; 7 | if ($this->CAdxResultXml->status==0) { 8 | return ToolsWS::getSucces("No result"); 9 | } 10 | // $result contient le fichier XML des réponses 11 | $dom = new DomDocument (); 12 | $dom->loadXML ( $result ); 13 | $RES = $dom->getElementsByTagName ( 'LIN' ); 14 | $str = ""; 15 | $str .= ""; 16 | 17 | foreach ( $RES as $R ) { 18 | $ligneStock = $R->getElementsByTagName ( 'FLD' ); 19 | $str .= ""; 20 | foreach ( $ligneStock as $c ) { 21 | $val = $c->getAttribute ( 'NAME' ); 22 | $val2 = $c->nodeValue; 23 | if (($val=="O_STOFCY") and ($val2=="")) { 24 | break 2; 25 | } 26 | $str .= ""; 29 | } 30 | $str .= ""; 31 | } 32 | $str .= "
SiteArticleLotDispo
"; 27 | $str .= $c->nodeValue; 28 | $str .= "
"; 33 | $str .= ""; 34 | 35 | return $str; 36 | } 37 | } 38 | ?> -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | X3 Web services - Home 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 |
X3 Web service
18 |
19 | This will show you how a web site,
can call a X3 web 20 | service. 21 |
22 | 23 |
24 | 25 |
26 |
27 | 28 | 29 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /vendor/composer/installed.php: -------------------------------------------------------------------------------- 1 | array( 3 | 'name' => '__root__', 4 | 'pretty_version' => 'dev-master', 5 | 'version' => 'dev-master', 6 | 'reference' => 'c55c7adb2112a0df171ab1cd93873c6ef03c9395', 7 | 'type' => 'library', 8 | 'install_path' => __DIR__ . '/../../', 9 | 'aliases' => array(), 10 | 'dev' => true, 11 | ), 12 | 'versions' => array( 13 | '__root__' => array( 14 | 'pretty_version' => 'dev-master', 15 | 'version' => 'dev-master', 16 | 'reference' => 'c55c7adb2112a0df171ab1cd93873c6ef03c9395', 17 | 'type' => 'library', 18 | 'install_path' => __DIR__ . '/../../', 19 | 'aliases' => array(), 20 | 'dev_requirement' => false, 21 | ), 22 | 'firebase/php-jwt' => array( 23 | 'pretty_version' => 'v6.10.0', 24 | 'version' => '6.10.0.0', 25 | 'reference' => 'a49db6f0a5033aef5143295342f1c95521b075ff', 26 | 'type' => 'library', 27 | 'install_path' => __DIR__ . '/../firebase/php-jwt', 28 | 'aliases' => array(), 29 | 'dev_requirement' => false, 30 | ), 31 | ), 32 | ); 33 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | register(true); 35 | 36 | return $loader; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/firebase/php-jwt/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "firebase/php-jwt", 3 | "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", 4 | "homepage": "https://github.com/firebase/php-jwt", 5 | "keywords": [ 6 | "php", 7 | "jwt" 8 | ], 9 | "authors": [ 10 | { 11 | "name": "Neuman Vong", 12 | "email": "neuman+pear@twilio.com", 13 | "role": "Developer" 14 | }, 15 | { 16 | "name": "Anant Narayanan", 17 | "email": "anant@php.net", 18 | "role": "Developer" 19 | } 20 | ], 21 | "license": "BSD-3-Clause", 22 | "require": { 23 | "php": "^7.4||^8.0" 24 | }, 25 | "suggest": { 26 | "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present", 27 | "ext-sodium": "Support EdDSA (Ed25519) signatures" 28 | }, 29 | "autoload": { 30 | "psr-4": { 31 | "Firebase\\JWT\\": "src" 32 | } 33 | }, 34 | "require-dev": { 35 | "guzzlehttp/guzzle": "^6.5||^7.4", 36 | "phpspec/prophecy-phpunit": "^2.0", 37 | "phpunit/phpunit": "^9.5", 38 | "psr/cache": "^1.0||^2.0", 39 | "psr/http-client": "^1.0", 40 | "psr/http-factory": "^1.0" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /includes/head.php: -------------------------------------------------------------------------------- 1 | isConnect (); 12 | } 13 | 14 | ?> 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 34 | 36 | 39 | 42 | -------------------------------------------------------------------------------- /authentication/JWT/TokenJWT.php: -------------------------------------------------------------------------------- 1 | clientId = Config::$JWT_CLIENT_ID; 17 | $this->secretOrPrivateKey = Config::$JWT_SECRET_OR_PRIVATE_KEY; 18 | $this->audience = Config::$JWT_AUDIENCE; 19 | $this->user = Config::$JWT_USER; 20 | 21 | } 22 | function getToken() { 23 | /* creating access token */ 24 | $issuedAt = time(); 25 | // jwt valid for 60 days (60 seconds * 60 minutes * 24 hours * 60 days) 26 | $expirationTime = $issuedAt + 60; 27 | $payload = array( 28 | "iss" => $this->clientId, 29 | "sub" => $this->user, 30 | "aud" => $this->audience, 31 | "iat" => $issuedAt, 32 | "exp" => $expirationTime 33 | ); 34 | 35 | /** 36 | * IMPORTANT: 37 | * You must specify supported algorithms for your application. See 38 | * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40 39 | * for a list of spec-compliant algorithms. 40 | */ 41 | $jwt = JWT::encode($payload, $this->secretOrPrivateKey,'HS256'); 42 | //console_php_log('token',$jwt); 43 | return $jwt; 44 | 45 | } 46 | } 47 | ?> -------------------------------------------------------------------------------- /vendor/firebase/php-jwt/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Neuman Vong 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following 13 | disclaimer in the documentation and/or other materials provided 14 | with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of other 17 | contributors may be used to endorse or promote products derived 18 | from this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /page_itm_list.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | List of X3 products 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |
List of products
19 |
Simulates the left list of X3 products
20 | 21 |
22 | 23 |
24 |
25 | 26 |
27 | 28 | 29 | 30 | 31 |
32 |
33 |
34 |

Result

35 | 36 | 37 | showListe ()); 42 | } catch ( SoapFault $e ) { 43 | ToolsWS::printError ( "X3 Web service not available" ); 44 | } 45 | ?> 46 | 47 | 48 |
49 |
50 |
51 |
52 | 53 | 54 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /page_soh_list.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | List of X3 orders 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |
List of X3 orders
19 |
Simulates the left list of X3 orders
20 | 21 |
22 | 23 |
24 |
25 | 26 |
27 | 28 | 29 | 30 | 31 |
32 |
33 |
34 |

Result

35 | 36 | 37 | showListe ()); 42 | } catch ( SoapFault $e ) { 43 | echo($e); 44 | ToolsWS::printError ( "X3 Web service not available" ); 45 | } 46 | ?> 47 | 48 | 49 |
50 |
51 |
52 |
53 | 54 | 55 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /logout_action.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Logout 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |
Se deconnecter
19 |
Au revoir
20 | 21 |
22 | 23 |
24 |
25 |

26 |

27 |
28 |
29 |
30 | 31 | 32 | 33 | 42 | 43 | 44 |
45 |
46 | 47 |
48 |
49 | 50 | 51 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /font-awesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | .sr-only() { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | .sr-only-focusable() { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | .sr-only() { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | .sr-only-focusable() { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /font-awesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | @mixin sr-only { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | @mixin sr-only-focusable { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /vendor/firebase/php-jwt/src/Key.php: -------------------------------------------------------------------------------- 1 | keyMaterial = $keyMaterial; 44 | $this->algorithm = $algorithm; 45 | } 46 | 47 | /** 48 | * Return the algorithm valid for this key 49 | * 50 | * @return string 51 | */ 52 | public function getAlgorithm(): string 53 | { 54 | return $this->algorithm; 55 | } 56 | 57 | /** 58 | * @return string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate 59 | */ 60 | public function getKeyMaterial() 61 | { 62 | return $this->keyMaterial; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /font-awesome/font-awesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | @mixin sr-only { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | @mixin sr-only-focusable { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /js/classie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * classie - class helper functions 3 | * from bonzo https://github.com/ded/bonzo 4 | * 5 | * classie.has( elem, 'my-class' ) -> true/false 6 | * classie.add( elem, 'my-new-class' ) 7 | * classie.remove( elem, 'my-unwanted-class' ) 8 | * classie.toggle( elem, 'my-class' ) 9 | */ 10 | 11 | /*jshint browser: true, strict: true, undef: true */ 12 | /*global define: false */ 13 | 14 | ( function( window ) { 15 | 16 | 'use strict'; 17 | 18 | // class helper functions from bonzo https://github.com/ded/bonzo 19 | 20 | function classReg( className ) { 21 | return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); 22 | } 23 | 24 | // classList support for class management 25 | // altho to be fair, the api sucks because it won't accept multiple classes at once 26 | var hasClass, addClass, removeClass; 27 | 28 | if ( 'classList' in document.documentElement ) { 29 | hasClass = function( elem, c ) { 30 | return elem.classList.contains( c ); 31 | }; 32 | addClass = function( elem, c ) { 33 | elem.classList.add( c ); 34 | }; 35 | removeClass = function( elem, c ) { 36 | elem.classList.remove( c ); 37 | }; 38 | } 39 | else { 40 | hasClass = function( elem, c ) { 41 | return classReg( c ).test( elem.className ); 42 | }; 43 | addClass = function( elem, c ) { 44 | if ( !hasClass( elem, c ) ) { 45 | elem.className = elem.className + ' ' + c; 46 | } 47 | }; 48 | removeClass = function( elem, c ) { 49 | elem.className = elem.className.replace( classReg( c ), ' ' ); 50 | }; 51 | } 52 | 53 | function toggleClass( elem, c ) { 54 | var fn = hasClass( elem, c ) ? removeClass : addClass; 55 | fn( elem, c ); 56 | } 57 | 58 | var classie = { 59 | // full names 60 | hasClass: hasClass, 61 | addClass: addClass, 62 | removeClass: removeClass, 63 | toggleClass: toggleClass, 64 | // short names 65 | has: hasClass, 66 | add: addClass, 67 | remove: removeClass, 68 | toggle: toggleClass 69 | }; 70 | 71 | // transport 72 | if ( typeof define === 'function' && define.amd ) { 73 | // AMD 74 | define( classie ); 75 | } else { 76 | // browser global 77 | window.classie = classie; 78 | } 79 | 80 | })( window ); -------------------------------------------------------------------------------- /page_get_token.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Get JWT Token 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |
Token
19 |
Get JWT Token
20 | 21 |
22 | 23 |
24 |
25 | 26 |
27 |
28 |
29 |
30 |
32 | 33 |
34 |
35 |
36 |
37 |
38 |

My JWT Token

39 | 40 | 41 | getToken()); 47 | //ToolsWS::printSucces ( $jwtToken->getToken() ); 48 | 49 | 50 | ?> 51 | 52 |
53 |
54 |
55 |
56 | 57 | 58 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /GraphQL/ModelGraphQLX3.php: -------------------------------------------------------------------------------- 1 | jwt = new TokenJWT (); 10 | } 11 | 12 | 13 | public function query($queryGraphQL, $variables='{}') { 14 | 15 | $curl = curl_init(); 16 | //var_dump($curl); 17 | $token = $this->jwt->getToken(); 18 | //var_dump($token); 19 | $graphQLServer = Config::$WEB_SERVER_X3 . "/xtrem/api"; 20 | curl_setopt_array($curl, array( 21 | CURLOPT_URL => $graphQLServer, 22 | CURLOPT_RETURNTRANSFER => true, 23 | CURLOPT_ENCODING => '', 24 | CURLOPT_MAXREDIRS => 10, 25 | CURLOPT_TIMEOUT => 0, 26 | CURLOPT_FOLLOWLOCATION => true, 27 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_NONE, 28 | CURLOPT_CUSTOMREQUEST => 'POST', 29 | CURLOPT_POSTFIELDS =>'{"query":"'.$queryGraphQL.'","variables":'.$variables.'}', 30 | CURLOPT_HTTPHEADER => array( 31 | //"authorization: Basic ". base64_encode(Config::$GQL_USER.":".Config::$GQL_PASSWORD), 32 | "Authorization: Bearer ". $token, 33 | "content-type: application/json", 34 | "x-xtrem-endpoint: ".Config::$GQL_ENDPOINT 35 | 36 | ), 37 | )); 38 | 39 | console_php_log('GraphQL query',$queryGraphQL); 40 | console_php_log('GraphQL variables',$variables); 41 | $response = curl_exec($curl); 42 | //var_dump(curl_getinfo($curl)); 43 | #var_dump($response); 44 | //console_php_log('GraphQL response',$response); 45 | curl_close($curl); 46 | //var_dump(curl_error($curl)); 47 | return $response; 48 | } 49 | 50 | public function readFileGraphQl($fileInput,$replace=true) { 51 | $file='GraphQL/'.$fileInput; 52 | $fileOpen = fopen($file, 'r'); 53 | 54 | $queryGraphQL=fread($fileOpen, filesize($file)); 55 | fclose($fileOpen); 56 | if ($replace==true) { 57 | $queryGraphQL = str_replace("\r","",$queryGraphQL); 58 | $queryGraphQL = str_replace("\n","",$queryGraphQL); 59 | $queryGraphQL = str_replace('"','\"',$queryGraphQL); 60 | } 61 | 62 | return $queryGraphQL; 63 | } 64 | } 65 | ?> 66 | 67 | -------------------------------------------------------------------------------- /connexion_action.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | To log in 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |
Connection
19 |
Succcesful connection ?
20 | 21 |
22 | 23 |
24 |
25 |

26 |

27 |
28 |
29 |
30 |

Result

31 | 32 | 33 | isConnect (); 42 | if ($isConnect) { 43 | //$_SESSION ["x3Connect"] = $x3Connect; 44 | $_SESSION ["x3login"] = $formlogin; 45 | $_SESSION ["x3passwd"] = $formpasswd; 46 | ToolsWS::printSucces ( "Successful connection" ); 47 | } else { 48 | $_SESSION ["x3login"] = ""; 49 | $_SESSION ["x3passwd"] = ""; 50 | ToolsWS::printError ( "connection refused" ); 51 | } 52 | 53 | ?> 54 | 55 | 56 |
57 |
58 | 59 |
60 |
61 | 62 | 63 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /connexion.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Connection 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |
Connection
19 |
You must sign in to use this Web site.
20 | 21 |
22 | 23 |
24 |
25 |

26 |

27 |
28 |
29 |
30 |
32 |
33 | Form 34 |
35 | 36 |
37 | 39 |
40 |
41 |
42 | 43 |
44 | 46 |
47 |
48 |
49 | 50 |
51 |
52 |
53 | 54 | 55 | 56 |
57 |
58 |
59 |
60 |
61 | 62 | 63 | 64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 |
72 |
73 | 74 | 75 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | { 4 | "name": "firebase/php-jwt", 5 | "version": "v6.10.0", 6 | "version_normalized": "6.10.0.0", 7 | "source": { 8 | "type": "git", 9 | "url": "https://github.com/firebase/php-jwt.git", 10 | "reference": "a49db6f0a5033aef5143295342f1c95521b075ff" 11 | }, 12 | "dist": { 13 | "type": "zip", 14 | "url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff", 15 | "reference": "a49db6f0a5033aef5143295342f1c95521b075ff", 16 | "shasum": "" 17 | }, 18 | "require": { 19 | "php": "^7.4||^8.0" 20 | }, 21 | "require-dev": { 22 | "guzzlehttp/guzzle": "^6.5||^7.4", 23 | "phpspec/prophecy-phpunit": "^2.0", 24 | "phpunit/phpunit": "^9.5", 25 | "psr/cache": "^1.0||^2.0", 26 | "psr/http-client": "^1.0", 27 | "psr/http-factory": "^1.0" 28 | }, 29 | "suggest": { 30 | "ext-sodium": "Support EdDSA (Ed25519) signatures", 31 | "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" 32 | }, 33 | "time": "2023-12-01T16:26:39+00:00", 34 | "type": "library", 35 | "installation-source": "dist", 36 | "autoload": { 37 | "psr-4": { 38 | "Firebase\\JWT\\": "src" 39 | } 40 | }, 41 | "notification-url": "https://packagist.org/downloads/", 42 | "license": [ 43 | "BSD-3-Clause" 44 | ], 45 | "authors": [ 46 | { 47 | "name": "Neuman Vong", 48 | "email": "neuman+pear@twilio.com", 49 | "role": "Developer" 50 | }, 51 | { 52 | "name": "Anant Narayanan", 53 | "email": "anant@php.net", 54 | "role": "Developer" 55 | } 56 | ], 57 | "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", 58 | "homepage": "https://github.com/firebase/php-jwt", 59 | "keywords": [ 60 | "jwt", 61 | "php" 62 | ], 63 | "support": { 64 | "issues": "https://github.com/firebase/php-jwt/issues", 65 | "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" 66 | }, 67 | "install-path": "../firebase/php-jwt" 68 | } 69 | ], 70 | "dev": true, 71 | "dev-package-names": [] 72 | } 73 | -------------------------------------------------------------------------------- /js/non_utilise_contact_me.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | $("input,textarea").jqBootstrapValidation({ 4 | preventSubmit: true, 5 | submitError: function($form, event, errors) { 6 | // additional error messages or events 7 | }, 8 | submitSuccess: function($form, event) { 9 | event.preventDefault(); // prevent default submit behaviour 10 | // get values from FORM 11 | var name = $("input#name").val(); 12 | var email = $("input#email").val(); 13 | var phone = $("input#phone").val(); 14 | var message = $("textarea#message").val(); 15 | var firstName = name; // For Success/Failure Message 16 | // Check for white space in name for Success/Fail message 17 | if (firstName.indexOf(' ') >= 0) { 18 | firstName = name.split(' ').slice(0, -1).join(' '); 19 | } 20 | $.ajax({ 21 | url: "././mail/contact_me.php", 22 | type: "POST", 23 | data: { 24 | name: name, 25 | phone: phone, 26 | email: email, 27 | message: message 28 | }, 29 | cache: false, 30 | success: function() { 31 | // Success message 32 | $('#success').html("
"); 33 | $('#success > .alert-success').html(""); 35 | $('#success > .alert-success') 36 | .append("Your message has been sent. "); 37 | $('#success > .alert-success') 38 | .append('
'); 39 | 40 | //clear all fields 41 | $('#contactForm').trigger("reset"); 42 | }, 43 | error: function() { 44 | // Fail message 45 | $('#success').html("
"); 46 | $('#success > .alert-danger').html(""); 48 | $('#success > .alert-danger').append("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"); 49 | $('#success > .alert-danger').append('
'); 50 | //clear all fields 51 | $('#contactForm').trigger("reset"); 52 | }, 53 | }) 54 | }, 55 | filter: function() { 56 | return $(this).is(":visible"); 57 | }, 58 | }); 59 | 60 | $("a[data-toggle=\"tab\"]").click(function(e) { 61 | e.preventDefault(); 62 | $(this).tab("show"); 63 | }); 64 | }); 65 | 66 | 67 | /*When clicking on Full hide fail/success boxes */ 68 | $('#name').focus(function() { 69 | $('#success').html(''); 70 | }); 71 | -------------------------------------------------------------------------------- /page_itm_read.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Read a X3 product 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |
Read a X3 product
20 |
Read a X3 product via the Object web service
21 | 22 |
23 | 24 |
25 |
26 |

27 |

28 |
29 |
30 |
31 |
33 |
34 | Selection 35 |
36 | 37 |
38 | 40 |
41 |
42 | 43 |
44 |
45 | 46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 |
55 |
56 |

Result

57 | 58 | 59 | showOne ( $itmref )); 67 | } catch ( SoapFault $e ) { 68 | ToolsWS::printError ( "X3 Web service not available" ); 69 | } 70 | } elseif (isset ( $_GET ["itmref"] )) { 71 | $itmref = $_GET ['itmref']; 72 | try { 73 | $product = new Product (); 74 | echo ($product->showOne ( $itmref )); 75 | } catch ( SoapFault $e ) { 76 | ToolsWS::printError ( "X3 Web service not available" ); 77 | } 78 | } 79 | 80 | ?> 81 | 82 | 83 | 84 | 85 |
86 |
87 |
88 | 89 | 90 | 105 |
106 | 107 | 108 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "dfe27548af6d83b7d428280eae1df087", 8 | "packages": [ 9 | { 10 | "name": "firebase/php-jwt", 11 | "version": "v6.10.0", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/firebase/php-jwt.git", 15 | "reference": "a49db6f0a5033aef5143295342f1c95521b075ff" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/firebase/php-jwt/zipball/a49db6f0a5033aef5143295342f1c95521b075ff", 20 | "reference": "a49db6f0a5033aef5143295342f1c95521b075ff", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": "^7.4||^8.0" 25 | }, 26 | "require-dev": { 27 | "guzzlehttp/guzzle": "^6.5||^7.4", 28 | "phpspec/prophecy-phpunit": "^2.0", 29 | "phpunit/phpunit": "^9.5", 30 | "psr/cache": "^1.0||^2.0", 31 | "psr/http-client": "^1.0", 32 | "psr/http-factory": "^1.0" 33 | }, 34 | "suggest": { 35 | "ext-sodium": "Support EdDSA (Ed25519) signatures", 36 | "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" 37 | }, 38 | "type": "library", 39 | "autoload": { 40 | "psr-4": { 41 | "Firebase\\JWT\\": "src" 42 | } 43 | }, 44 | "notification-url": "https://packagist.org/downloads/", 45 | "license": [ 46 | "BSD-3-Clause" 47 | ], 48 | "authors": [ 49 | { 50 | "name": "Neuman Vong", 51 | "email": "neuman+pear@twilio.com", 52 | "role": "Developer" 53 | }, 54 | { 55 | "name": "Anant Narayanan", 56 | "email": "anant@php.net", 57 | "role": "Developer" 58 | } 59 | ], 60 | "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", 61 | "homepage": "https://github.com/firebase/php-jwt", 62 | "keywords": [ 63 | "jwt", 64 | "php" 65 | ], 66 | "support": { 67 | "issues": "https://github.com/firebase/php-jwt/issues", 68 | "source": "https://github.com/firebase/php-jwt/tree/v6.10.0" 69 | }, 70 | "time": "2023-12-01T16:26:39+00:00" 71 | } 72 | ], 73 | "packages-dev": [], 74 | "aliases": [], 75 | "minimum-stability": "stable", 76 | "stability-flags": [], 77 | "prefer-stable": false, 78 | "prefer-lowest": false, 79 | "platform": [], 80 | "platform-dev": [], 81 | "plugin-api-version": "2.6.0" 82 | } 83 | -------------------------------------------------------------------------------- /page_soh_read.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Read a X3 order 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |
Read a X3 order
20 |
Read a X3 order via the Object web 21 | service
22 | 23 |
24 | 25 |
26 |
27 |

28 |

29 |
30 |
31 |
32 |
34 |
35 | Selection 36 |
37 | 39 |
40 | 42 |
43 |
44 | 45 |
46 |
47 | 48 | 49 |
50 |
51 |
52 |
53 |
54 |
55 | 56 |
57 |
58 |

Result

59 | 60 | 61 | showOne ( $sohnum )); 69 | } catch ( SoapFault $e ) { 70 | ToolsWS::printError ( "X3 Web service not available" ); 71 | } 72 | } elseif (isset ( $_GET ["sohnum"] )) { 73 | $sohnum = $_GET ['sohnum']; 74 | try { 75 | $order = new Order (); 76 | echo ($order->showOne ( $sohnum )); 77 | } catch ( SoapFault $e ) { 78 | ToolsWS::printError ( "X3 Web service not available" ); 79 | } 80 | } 81 | 82 | ?> 83 | 84 | 85 | 86 | 87 |
88 |
89 |
90 | 91 | 92 | 107 |
108 | 109 | 110 | -------------------------------------------------------------------------------- /page_pth_gq_read.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Read a X3 order 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |
Read a X3 receipt
20 |
Read a X3 receipt via GraphQL api
21 | 22 |
23 | 24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 | Selection 34 |
35 | 36 |
37 | 39 |
40 |
41 | 42 |
43 |
44 | 45 | 46 |
47 |
48 | 49 |
50 | 51 |

Purchase receipt details

52 | 53 |
54 |
55 |
56 | 57 |
58 |
59 | 60 | 61 | 62 | showOne( $receiptnum )); 72 | 73 | } elseif (isset ( $_GET ["_id"] )) { 74 | 75 | $receiptnum = $_GET ['_id']; 76 | $receipt = new PurchaseReceipt (); 77 | echo ($receipt->showOne( $receiptnum )); 78 | 79 | } 80 | 81 | ?> 82 |
83 |
84 | 85 | 86 |
87 | 88 | 89 | 110 |
111 | 112 | 113 | -------------------------------------------------------------------------------- /page_stock_list.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | List of X3 orders 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |
Stock
19 | 20 |
21 | 22 |
23 |
24 | 25 |
26 |
27 | 28 |
29 |
30 |
32 |
33 | Selection 34 |
35 | 36 |
37 | 39 |
40 |
41 |
42 | 43 |
44 | 46 |
47 |
48 |
49 | 50 |
51 | 53 |
54 |
55 | 56 |
57 |
58 | 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 | 67 |
68 |
69 |

Result

70 | 71 | "; 80 | $WS .= "$formfcypat"; 81 | $WS .= "$formitmpat"; 82 | $WS .= "$formlotpat"; 83 | $WS .= ""; 84 | $WS .= ""; 85 | try { 86 | $stock = new Stock (); 87 | echo ($stock->Liste ($WS)); 88 | } catch ( SoapFault $e ) { 89 | ToolsWS::printError ( "X3 Web service not available" ); 90 | } 91 | } 92 | ?> 93 | 94 |
95 |
96 |
97 |
98 | 99 | 100 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /page_soh_create_action.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | X3 order created 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |
Creation of X3 order
20 |
Gives details of the X3 order following 21 | the creation via web service
22 | 23 |
24 | 25 |
26 |
27 |

28 |

29 |
30 |
31 |
32 |

Result

33 | 34 | 35 | "; 38 | $formsalfcy = $_POST ['formsalfcy']; 39 | $formsohtyp = $_POST ['formsohtyp']; 40 | $formorddat = $_POST ['formorddat']; 41 | $formcur = $_POST ['formcur']; 42 | $formbpcord = $_POST ['formbpcord']; 43 | 44 | $formtabitmref = $_POST ['formtabitmref']; 45 | $formtabqty = $_POST ['formtabqty']; 46 | 47 | $WS = ""; 48 | $WS .= "$formsalfcy"; 49 | $WS .= "$formsohtyp"; 50 | $newDate = date ( "Ymd", strtotime ( $formorddat ) ); 51 | // echo ("olivier".$newDate); 52 | $WS .= "$newDate"; 53 | $WS .= "$formcur"; 54 | $WS .= "$formbpcord"; 55 | $WS .= "WEBPHP"; 56 | $WS .= ""; 57 | $WS.=""; 58 | $WS .= "$formsalfcy"; 59 | $WS .= ""; 60 | $WS.=""; 61 | for($i = 0; $i < count ( $formtabitmref ); $i ++) { 62 | $WS .= ""; 63 | $WS .= "$formtabitmref[$i]"; 64 | $WS .= "$formtabqty[$i]"; 65 | $WS .= ""; 66 | } 67 | 68 | $WS .= ""; 69 | 70 | try { 71 | $order = new Order (); 72 | echo ($order->create ( $WS )); 73 | } catch ( SoapFault $e ) { 74 | ToolsWS::printError ( "X3 web service not available" ); 75 | } 76 | 77 | ?> 78 | 79 | 80 |
81 |
82 | 83 |
84 |
85 | 86 | 87 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /GraphQL/PurchaseReceipt.php: -------------------------------------------------------------------------------- 1 | readFileGraphQl('PurchaseReceipt_read.graphql',true); 10 | //$queryGraphQL=str_replace("%<_id>%",$_id,$queryGraphQL); 11 | 12 | $vars =''; 13 | $vars .='{'; 14 | $vars .=' "id": "'.$_id.'"'; 15 | $vars .=' }'; 16 | //echo($queryGraphQL); 17 | //echo($vars); 18 | 19 | $response=$this->query($queryGraphQL,$vars); 20 | //var_dump($response); 21 | $json=json_decode($response); 22 | 23 | 24 | $read = $json->{'data'}->{'x3Purchasing'}->{'purchaseReceipt'}->{'read'}; 25 | //var_dump($read); 26 | 27 | if (is_null($read)) { 28 | return ToolsWS::getSucces ( "No result" ); 29 | } 30 | $str = ""; 31 | // header 32 | $str .= "
"; 33 | 34 | $str .= ""; 64 | $str .= "
"; 65 | // Lines 66 | $str .= ""; 67 | $str .= ""; 68 | $edges = $read->{'lines'}->{'query'}->{'edges'}; 69 | foreach ( $edges as $edge ) { 70 | $str .= ""; 71 | 72 | $str .= ""; 75 | 76 | $str .= ""; 79 | 80 | $str .= ""; 83 | 84 | $str .= ""; 87 | 88 | $str .= ""; 91 | 92 | $str .= ""; 93 | } 94 | $str .= "
Line numberPurchase orderPurchase order linePurchase order sequenceQuantity received
"; 73 | $str .= $edge->{'node'}->{'lineNumber'}; 74 | $str .= ""; 77 | $str .= $edge->{'node'}->{'purchaseOrder'}->{'id'}; 78 | $str .= ""; 81 | $str .= $edge->{'node'}->{'purchaseOrderLine'}->{'lineNumber'}; 82 | $str .= ""; 85 | $str .= $edge->{'node'}->{'purchaseOrderLine'}->{'sequenceNumber'}; 86 | $str .= ""; 89 | $str .= $edge->{'node'}->{'quantityInReceiptUnitReceived'}; 90 | $str .= "
"; 95 | $str .= "
"; 96 | 97 | return $str; 98 | } 99 | function create($arrayInput) { 100 | 101 | $queryGraphQL=$this->readFileGraphQl('PurchaseReceipt_mutation.graphql',true); 102 | 103 | $vars =''; 104 | $vars = json_encode($arrayInput); 105 | 106 | $response=$this->query($queryGraphQL,$vars); 107 | //console_php_log('GraphQL response',$response); 108 | $json=json_decode($response); 109 | 110 | 111 | $create = $json->{'data'}->{'x3Purchasing'}->{'purchaseReceipt'}->{'create'}; 112 | 113 | if (is_null($create)) { 114 | return ToolsWS::getError ( "unsuccessful creation" ); 115 | } 116 | $id = $create->{'id'}; 117 | return $id; 118 | 119 | } 120 | 121 | function display($receiptNum) { 122 | 123 | 124 | $ret=""; 125 | 126 | $mess= 'Receipt created : '.''.$receiptNum.''; 127 | $ret = ToolsWS::getSucces ( $mess ); 128 | return $ret; 129 | 130 | } 131 | } 132 | 133 | ?> 134 | -------------------------------------------------------------------------------- /page_poh_gq_list.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | List of X3 orders 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |
List of X3 orders
19 |
Use the GraphQL api
20 | 21 |
22 | 23 |
24 |
25 | 26 |
27 |
28 |
29 |
30 |
32 |
33 | Selection 34 |
35 | 36 |
37 | 39 |
40 |
41 |
42 | 43 |
44 | 46 |
47 |
48 |
49 | 50 |
51 | 59 |
60 |
61 |
62 |
63 | 64 | 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |

My purchase orders list

74 | 75 | 76 | showList ( $businesspartnerid, $purchasesite, $receiptstatus )); 95 | 96 | 97 | ?> 98 | 99 |
100 |
101 |
102 |
103 | 104 | 105 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /WebServiceSOAP/modelWS/CAdxTechnicalInfos.php: -------------------------------------------------------------------------------- 1 | busy = $busy; 143 | $this->changeLanguage = $changeLanguage; 144 | $this->changeUserId = $changeUserId; 145 | $this->flushAdx = $flushAdx; 146 | $this->loadWebsDuration = $loadWebsDuration; 147 | $this->nbDistributionCycle = $nbDistributionCycle; 148 | $this->poolDistribDuration = $poolDistribDuration; 149 | $this->poolEntryIdx = $poolEntryIdx; 150 | $this->poolExecDuration = $poolExecDuration; 151 | $this->poolRequestDuration = $poolRequestDuration; 152 | $this->poolWaitDuration = $poolWaitDuration; 153 | $this->processReportSize = $processReportSize; 154 | $this->reloadWebs = $reloadWebs; 155 | $this->resumitAfterDBOpen = $resumitAfterDBOpen; 156 | $this->rowInDistribStack = $rowInDistribStack; 157 | $this->totalDuration = $totalDuration; 158 | $this->traceRequestSize = $traceRequestSize; 159 | } 160 | 161 | } 162 | -------------------------------------------------------------------------------- /includes/menu_home.php: -------------------------------------------------------------------------------- 1 | 130 | -------------------------------------------------------------------------------- /page_soh_create.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Creation of a X3 order 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |
Creation of a X3 order
20 |
Lets create a X3 order via web service
21 | 22 |
23 | 24 |
25 |
26 |

27 |

28 |
29 |
30 |
31 | 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | 50 |
52 |
53 | Form 54 |
55 | 56 | 60 |
61 | 65 |
66 |
67 |
68 | 69 |
70 | 72 |
73 |
74 |
75 | 76 |
77 | "> 79 |
80 |
81 |
82 | 83 |
84 | 86 |
87 |
88 |
89 | 90 |
91 | 97 | 98 |
99 |
100 |
101 | 102 |
103 | 104 |
105 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 121 | 123 | 132 | 133 | 134 | 135 | 136 |
ProductQuantity
127 |
137 |
138 | 139 |
140 |
141 |
142 |
143 | 144 | 145 |
146 |
147 |
148 |
149 |
150 | 151 | 152 | 153 |
154 | 155 | 156 | 157 | 158 | 159 | 160 |
161 |
162 | 163 | 164 | 186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /page_poh_gq_read.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Read a X3 order 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |
Read a X3 order
20 |
Read a X3 order via GraphQL api
21 | 22 |
23 | 24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 | Selection 34 |
35 | 36 |
37 | 39 |
40 |
41 | 42 |
43 |
44 | 45 | 46 | 47 |
48 |
49 | 50 |
51 | 52 |

Purchase order details

53 |
54 | 55 | showOneDetailOrder ( $ordnum )); 65 | } elseif (isset($_POST ["create_recept"])) { 66 | //var_dump($_POST); 67 | $receipt = new purchaseReceipt(); 68 | 69 | $receiptSite=$_POST ["formpurshasesite"]; 70 | $receiptDate=date("Y-m-d"); 71 | $supplier=$_POST ["formsupplier"]; 72 | 73 | $tabLineNumber = $_POST ["formtablinenumber"]; 74 | $tabProduct = $_POST ["formtabproduct"]; 75 | $tabBorderUnit = $_POST ["formtaborderunit"]; 76 | $tabQtyToReceive = $_POST ["formtabqtytoreceive"]; 77 | //echo(count ( $tabLineNumber )); 78 | $arrayLine= array(count ( $tabLineNumber )); 79 | for($i = 0; $i < count ( $tabLineNumber ); $i ++) { 80 | if ($tabQtyToReceive[$i]>0) { 81 | $arrayLine[$i] = array ( 82 | "receiptSite"=>$receiptSite, 83 | "purchaseOrder"=>$ordnum, 84 | "purchaseOrderLineNumber"=>$tabLineNumber[$i], 85 | "product"=>$tabProduct[$i], 86 | "receiptUnit"=>$tabBorderUnit[$i], 87 | "quantityInReceiptUnitReceived"=>$tabQtyToReceive[$i], 88 | "stockDetails"=> array ( 89 | "status"=>"A", 90 | "packingUnit"=>$tabBorderUnit[$i], 91 | "quantityInPackingUnit"=>$tabQtyToReceive[$i] 92 | ) 93 | ); 94 | } 95 | } 96 | //var_dump($arrayLine); 97 | $arrayInput = array ( 98 | "data"=> array ( 99 | "receiptSite"=>$receiptSite, 100 | "receiptDate"=>$receiptDate, 101 | "supplier"=> $supplier, 102 | "lines"=> $arrayLine 103 | ) 104 | ); 105 | //var_dump($arrayInput); 106 | 107 | $receiptNum=$receipt->create ($arrayInput); 108 | echo ($order->showOneDetailOrder ( $ordnum )); 109 | 110 | } 111 | 112 | 113 | } elseif (isset ( $_GET ["_id"] )) { 114 | $ordnum = $_GET ['_id']; 115 | $order = new PurchaseOrder (); 116 | //if (isset($_POST ["read"])) { 117 | echo ($order->showOneDetailOrder ( $ordnum )); 118 | //} 119 | 120 | } 121 | } catch (Exception $e) { 122 | ToolsWS::printError ( $e ); 123 | } 124 | ?> 125 |
126 |
127 |
128 |
129 |
130 |
131 | 132 | 133 | 134 | Receipt created'); 137 | 138 | if (isset($receiptNum)) { 139 | $receipt = new purchaseReceipt(); 140 | echo $receipt->display($receiptNum); 141 | } 142 | 143 | ?> 144 |
145 |
146 |
147 |
148 | 149 | 150 | 151 | List of Purchase receipts'); 154 | if (isset ( $_POST ["formordnum"] )) { 155 | //echo ('ol1'); 156 | $ordnum = $_POST ['formordnum']; 157 | $order = new PurchaseOrder (); 158 | //if (isset($_POST ["read"]) || isset($_POST ["create_recept"])) { 159 | 160 | if ($ordnum!='') 161 | echo ($order->showOneListRecept ( $ordnum )); 162 | //} 163 | 164 | 165 | } elseif (isset ( $_GET ["_id"] )) { 166 | //echo ('ol2'); 167 | $ordnum = $_GET ['_id']; 168 | $order = new PurchaseOrder (); 169 | //if (isset($_POST ["read"])) { 170 | echo ($order->showOneListRecept ( $ordnum )); 171 | //} 172 | 173 | } 174 | //echo ($order->showOneDetailOrder ( $ordnum )); 175 | //echo ('ol3'); 176 | ?> 177 |
178 |
179 | 180 | 181 |
182 | 183 | 184 | 205 |
206 | 207 | 208 | -------------------------------------------------------------------------------- /WebServiceSOAP/modelWS/CAdxWebServiceXmlCCService.php: -------------------------------------------------------------------------------- 1 | '\CAdxCallContext', 22 | 'CAdxMessage' => '\CAdxMessage', 23 | 'CAdxTechnicalInfos' => '\CAdxTechnicalInfos', 24 | 'CAdxResultXml' => '\CAdxResultXml', 25 | 'CAdxParamKeyValue' => '\CAdxParamKeyValue'); 26 | 27 | /** 28 | * @param array $options A array of config values 29 | * @param string $wsdl The wsdl file to use 30 | * @access public 31 | */ 32 | public function __construct(array $options = array(), $wsdl = 'http://localhost:8124/soap-wsdl/syracuse/collaboration/syracuse/CAdxWebServiceSOAPXmlCC?wsdl') 33 | { 34 | foreach (self::$classmap as $key => $value) { 35 | if (!isset($options['classmap'][$key])) { 36 | $options['classmap'][$key] = $value; 37 | } 38 | } 39 | 40 | parent::__construct($wsdl, $options); 41 | } 42 | 43 | /** 44 | * Run X3 sub program 45 | * 46 | * @param CAdxCallContext $callContext 47 | * @param string $publicName 48 | * @param string $inputXml 49 | * @access public 50 | * @return CAdxResultXml 51 | */ 52 | public function run(CAdxCallContext $callContext, $publicName, $inputXml) 53 | { 54 | return $this->__soapCall('run', array($callContext, $publicName, $inputXml)); 55 | } 56 | 57 | /** 58 | * Create X3 object 59 | * 60 | * @param CAdxCallContext $callContext 61 | * @param string $publicName 62 | * @param string $objectXml 63 | * @access public 64 | * @return CAdxResultXml 65 | */ 66 | public function save(CAdxCallContext $callContext, $publicName, $objectXml) 67 | { 68 | return $this->__soapCall('save', array($callContext, $publicName, $objectXml)); 69 | } 70 | 71 | /** 72 | * Delete X3 object 73 | * 74 | * @param CAdxCallContext $callContext 75 | * @param string $publicName 76 | * @param ArrayOfCAdxParamKeyValue $objectKeys 77 | * @access public 78 | * @return CAdxResultXml 79 | */ 80 | public function delete(CAdxCallContext $callContext, $publicName, $objectKeys) 81 | { 82 | return $this->__soapCall('delete', array($callContext, $publicName, $objectKeys)); 83 | } 84 | 85 | /** 86 | * Read X3 object 87 | * 88 | * @param CAdxCallContext $callContext 89 | * @param string $publicName 90 | * @param ArrayOfCAdxParamKeyValue $objectKeys 91 | * @access public 92 | * @return CAdxResultXml 93 | */ 94 | public function read(CAdxCallContext $callContext, $publicName, $objectKeys) 95 | { 96 | return $this->__soapCall('read', array($callContext, $publicName, $objectKeys)); 97 | } 98 | 99 | /** 100 | * Get X3 objects list 101 | * 102 | * @param CAdxCallContext $callContext 103 | * @param string $publicName 104 | * @param ArrayOfCAdxParamKeyValue $objectKeys 105 | * @param int $listSize 106 | * @access public 107 | * @return CAdxResultXml 108 | */ 109 | public function query(CAdxCallContext $callContext, $publicName, $objectKeys, $listSize) 110 | { 111 | return $this->__soapCall('query', array($callContext, $publicName, $objectKeys, $listSize)); 112 | } 113 | 114 | /** 115 | * Get X3 web service description regarding publication done in GESAWE 116 | * 117 | * @param CAdxCallContext $callContext 118 | * @param string $publicName 119 | * @access public 120 | * @return CAdxResultXml 121 | */ 122 | public function getDescription(CAdxCallContext $callContext, $publicName) 123 | { 124 | return $this->__soapCall('getDescription', array($callContext, $publicName)); 125 | } 126 | 127 | /** 128 | * Update X3 object 129 | * 130 | * @param CAdxCallContext $callContext 131 | * @param string $publicName 132 | * @param ArrayOfCAdxParamKeyValue $objectKeys 133 | * @param string $objectXml 134 | * @access public 135 | * @return CAdxResultXml 136 | */ 137 | public function modify(CAdxCallContext $callContext, $publicName, $objectKeys, $objectXml) 138 | { 139 | return $this->__soapCall('modify', array($callContext, $publicName, $objectKeys, $objectXml)); 140 | } 141 | 142 | /** 143 | * Execute specific action on X3 object providing XML flow 144 | * 145 | * @param CAdxCallContext $callContext 146 | * @param string $publicName 147 | * @param string $actionCode 148 | * @param string $objectXml 149 | * @access public 150 | * @return CAdxResultXml 151 | */ 152 | public function actionObject(CAdxCallContext $callContext, $publicName, $actionCode, $objectXml) 153 | { 154 | return $this->__soapCall('actionObject', array($callContext, $publicName, $actionCode, $objectXml)); 155 | } 156 | 157 | /** 158 | * Execute specific action on X3 object providing keys 159 | * 160 | * @param CAdxCallContext $callContext 161 | * @param string $publicName 162 | * @param string $actionCode 163 | * @param ArrayOfCAdxParamKeyValue $objectKeys 164 | * @access public 165 | * @return CAdxResultXml 166 | */ 167 | public function actionObjectKeys(CAdxCallContext $callContext, $publicName, $actionCode, $objectKeys) 168 | { 169 | return $this->__soapCall('actionObjectKeys', array($callContext, $publicName, $actionCode, $objectKeys)); 170 | } 171 | 172 | /** 173 | * Get X3 web service schema regarding publication done in GESAWE 174 | * 175 | * @param CAdxCallContext $callContext 176 | * @param string $publicName 177 | * @access public 178 | * @return CAdxResultXml 179 | */ 180 | public function getDataXmlSchema(CAdxCallContext $callContext, $publicName) 181 | { 182 | return $this->__soapCall('getDataXmlSchema', array($callContext, $publicName)); 183 | } 184 | 185 | /** 186 | * NOT YET IMPLEMENTED !!! 187 | * 188 | * @param CAdxCallContext $callContext 189 | * @param string $publicName 190 | * @param ArrayOfCAdxParamKeyValue $objectKeys 191 | * @param string $blocKey 192 | * @param string $lineKey 193 | * @param string $lineXml 194 | * @access public 195 | * @return CAdxResultXml 196 | */ 197 | public function insertLines(CAdxCallContext $callContext, $publicName, $objectKeys, $blocKey, $lineKey, $lineXml) 198 | { 199 | return $this->__soapCall('insertLines', array($callContext, $publicName, $objectKeys, $blocKey, $lineKey, $lineXml)); 200 | } 201 | 202 | /** 203 | * Remove lines from X3 object table 204 | * 205 | * @param CAdxCallContext $callContext 206 | * @param string $publicName 207 | * @param ArrayOfCAdxParamKeyValue $objectKeys 208 | * @param string $blocKey 209 | * @param ArrayOf_xsd_string $lineKeys 210 | * @access public 211 | * @return CAdxResultXml 212 | */ 213 | public function deleteLines(CAdxCallContext $callContext, $publicName, $objectKeys, $blocKey, $lineKeys) 214 | { 215 | return $this->__soapCall('deleteLines', array($callContext, $publicName, $objectKeys, $blocKey, $lineKeys)); 216 | } 217 | 218 | } 219 | -------------------------------------------------------------------------------- /WebService/modelWS/ModelX3.php: -------------------------------------------------------------------------------- 1 | 'CAdxCallContext', 10 | * 'CAdxMessage' => 'CAdxMessage', 11 | * 'CAdxTechnicalInfos' => 'CAdxTechnicalInfos', 12 | * 'CAdxResultXml' => 'CAdxResultXml', 13 | * 'CAdxParamKeyValue' => 'CAdxParamKeyValue' 14 | * ); 15 | */ 16 | private $callContext = array (); 17 | function __construct() { 18 | $wsdl = Config::$WSDL; 19 | // $options = array(); 20 | // foreach($this->classmap as $key => $value) { 21 | // $options['classmap'][$key] = $value; 22 | // } 23 | 24 | $optionsAuth = Array ( 25 | 'cache_wsdl' => WSDL_CACHE_NONE, 26 | 'login' => Config::$CODE_USER, 27 | 'password' => Config::$PASSWORD, 28 | 'trace' => 0 29 | ); 30 | $this->soapClient = new SoapClient ( $wsdl, $optionsAuth ); 31 | // $this->callContext = array('codeLang'=>Config::$CODE_LANG, 'codeUser'=>Config::$CODE_USER, 'password'=>Config::$PASSWORD, 'poolAlias'=>Config::$POOL_ALIAS, 'requestConfig'=>Config::$REQUEST_CONFIG); 32 | // codeUser and password had deleted in the class CAdxCallContext 33 | $this->callContext = array ( 34 | 'codeLang' => Config::$CODE_LANG, 35 | 'poolAlias' => Config::$POOL_ALIAS, 36 | 'requestConfig' => Config::$REQUEST_CONFIG 37 | ); 38 | } 39 | 40 | /** 41 | * 42 | * @param CAdxCallContext $callContext 43 | * @param string $publicName 44 | * @param string $inputXml 45 | * @return CAdxResultXml 46 | */ 47 | public function run($publicName, $inputXml) { 48 | return $this->soapClient->__soapCall ( 'run', array ( 49 | $this->callContext, 50 | $publicName, 51 | $inputXml 52 | ), array ( 53 | 'uri' => '', 54 | 'soapaction' => '' 55 | ) ); 56 | } 57 | // http://www.adonix.com/WSS 58 | /** 59 | * 60 | * @param CAdxCallContext $callContext 61 | * @param string $publicName 62 | * @param string $objectXml 63 | * @return CAdxResultXml 64 | */ 65 | public function save($publicName, $objectXml) { 66 | return $this->soapClient->__soapCall ( 'save', array ( 67 | $this->callContext, 68 | $publicName, 69 | $objectXml 70 | ), array ( 71 | 'uri' => 'http://www.adonix.com/WSS', 72 | 'soapaction' => '' 73 | ) ); 74 | } 75 | 76 | /** 77 | * 78 | * @param CAdxCallContext $callContext 79 | * @param string $publicName 80 | * @param ArrayOfCAdxParamKeyValue $objectKeys 81 | * @return CAdxResultXml 82 | */ 83 | public function delete($publicName, $objectKeys) { 84 | return $this->soapClient->__soapCall ( 'delete', array ( 85 | $this->callContext, 86 | $publicName, 87 | $objectKeys 88 | ), array ( 89 | 'uri' => 'http://www.adonix.com/WSS', 90 | 'soapaction' => '' 91 | ) ); 92 | } 93 | 94 | /** 95 | * 96 | * @param CAdxCallContext $callContext 97 | * @param string $publicName 98 | * @param ArrayOfCAdxParamKeyValue $objectKeys 99 | * @return CAdxResultXml 100 | */ 101 | public function read($publicName, $objectKeys) { 102 | return $this->soapClient->__soapCall ( 'read', array ( 103 | $this->callContext, 104 | $publicName, 105 | $objectKeys 106 | ), array ( 107 | 'uri' => 'http://www.adonix.com/WSS', 108 | 'soapaction' => '' 109 | ) ); 110 | } 111 | 112 | /** 113 | * 114 | * @param CAdxCallContext $callContext 115 | * @param string $publicName 116 | * @param ArrayOfCAdxParamKeyValue $objectKeys 117 | * @param int $listSize 118 | * @return CAdxResultXml 119 | */ 120 | public function query($publicName, $objectKeys, $listSize) { 121 | return $this->soapClient->__soapCall ( 'query', array ( 122 | $this->callContext, 123 | $publicName, 124 | $objectKeys, 125 | $listSize 126 | ), array ( 127 | 'uri' => 'http://www.adonix.com/WSS', 128 | 'soapaction' => '' 129 | ) ); 130 | } 131 | 132 | /** 133 | * 134 | * @param CAdxCallContext $callContext 135 | * @param string $publicName 136 | * @return CAdxResultXml 137 | */ 138 | public function getDescription($publicName) { 139 | return $this->soapClient->__soapCall ( 'getDescription', array ( 140 | $this->callContext, 141 | $publicName 142 | ), array ( 143 | 'uri' => 'http://www.adonix.com/WSS', 144 | 'soapaction' => '' 145 | ) ); 146 | } 147 | 148 | /** 149 | * 150 | * @param CAdxCallContext $callContext 151 | * @param string $publicName 152 | * @param ArrayOfCAdxParamKeyValue $objectKeys 153 | * @param string $objectXml 154 | * @return CAdxResultXml 155 | */ 156 | public function modify($publicName, $objectKeys, $objectXml) { 157 | return $this->soapClient->__soapCall ( 'modify', array ( 158 | $this->callContext, 159 | $publicName, 160 | $objectKeys, 161 | $objectXml 162 | ), array ( 163 | 'uri' => 'http://www.adonix.com/WSS', 164 | 'soapaction' => '' 165 | ) ); 166 | } 167 | 168 | /** 169 | * 170 | * @param CAdxCallContext $callContext 171 | * @param string $publicName 172 | * @param string $actionCode 173 | * @param ArrayOfCAdxParamKeyValue $objectKeys 174 | * @return CAdxResultXml 175 | */ 176 | public function actionObject($callContext, $publicName, $actionCode, $objectKeys) { 177 | return $this->soapClient->__soapCall ( 'actionObject', array ( 178 | $callContext, 179 | $publicName, 180 | $actionCode, 181 | $objectKeys 182 | ), array ( 183 | 'uri' => 'http://www.adonix.com/WSS', 184 | 'soapaction' => '' 185 | ) ); 186 | } 187 | 188 | /** 189 | * 190 | * @param CAdxCallContext $callContext 191 | * @param string $publicName 192 | * @param ArrayOfCAdxParamKeyValue $objectKeys 193 | * @param string $blocKey 194 | * @param ArrayOf_xsd_string $lineKeys 195 | * @return CAdxResultXml 196 | */ 197 | public function deleteLines($callContext, $publicName, $objectKeys, $blocKey, $lineKeys) { 198 | return $this->soapClient->__soapCall ( 'deleteLines', array ( 199 | $callContext, 200 | $publicName, 201 | $objectKeys, 202 | $blocKey, 203 | $lineKeys 204 | ), array ( 205 | 'uri' => 'http://www.adonix.com/WSS', 206 | 'soapaction' => '' 207 | ) ); 208 | } 209 | 210 | /** 211 | * 212 | * @param CAdxCallContext $callContext 213 | * @param string $publicName 214 | * @param ArrayOfCAdxParamKeyValue $objectKeys 215 | * @param string $blocKey 216 | * @param string $lineKey 217 | * @param string $lineXml 218 | * @return CAdxResultXml 219 | */ 220 | public function insertLines($callContext, $publicName, $objectKeys, $blocKey, $lineKey, $lineXml) { 221 | return $this->soapClient->__soapCall ( 'insertLines', array ( 222 | $callContext, 223 | $publicName, 224 | $objectKeys, 225 | $blocKey, 226 | $lineKey, 227 | $lineXml 228 | ), array ( 229 | 'uri' => 'http://www.adonix.com/WSS', 230 | 'soapaction' => '' 231 | ) ); 232 | } 233 | 234 | /** 235 | * 236 | * @param CAdxCallContext $callContext 237 | * @param string $publicName 238 | * @return CAdxResultXml 239 | */ 240 | public function getDataXmlSchema($callContext, $publicName) { 241 | return $this->soapClient->__soapCall ( 'getDataXmlSchema', array ( 242 | $callContext, 243 | $publicName 244 | ), array ( 245 | 'uri' => 'http://www.adonix.com/WSS', 246 | 'soapaction' => '' 247 | ) ); 248 | } 249 | } 250 | ?> 251 | 252 | -------------------------------------------------------------------------------- /WebServiceSOAP/modelWS/ModelX3.php: -------------------------------------------------------------------------------- 1 | 'CAdxCallContext', 11 | * 'CAdxMessage' => 'CAdxMessage', 12 | * 'CAdxTechnicalInfos' => 'CAdxTechnicalInfos', 13 | * 'CAdxResultXml' => 'CAdxResultXml', 14 | * 'CAdxParamKeyValue' => 'CAdxParamKeyValue' 15 | * ); 16 | */ 17 | private $callContext = array (); 18 | private $jwt; 19 | function __construct() { 20 | $jwt = new TokenJWT (); 21 | $token = $jwt->getToken(); 22 | //$wsdl = Config::$WSDL; 23 | $wsdl = Config::$WEB_SERVER_X3 . "/soap-wsdl/syracuse/collaboration/syracuse/CAdxWebServiceXmlCC?wsdl"; 24 | $optionsAuth = Array ( 25 | 'cache_wsdl' => WSDL_CACHE_NONE, 26 | //'login' => Config::$CODE_USER, 27 | //'password' => Config::$PASSWORD, 28 | 'trace' => 1 , 29 | 'stream_context' => stream_context_create(array( 30 | 'http' => array( 31 | 'header' => 'Authorization: Bearer '.$token 32 | ), 33 | )) 34 | ); 35 | $this->soapClient = new SoapClient ( $wsdl, $optionsAuth); 36 | // $this->callContext = array('codeLang'=>Config::$CODE_LANG, 'codeUser'=>Config::$CODE_USER, 'password'=>Config::$PASSWORD, 'poolAlias'=>Config::$POOL_ALIAS, 'requestConfig'=>Config::$REQUEST_CONFIG); 37 | // codeUser and password had deleted in the class CAdxCallContext 38 | 39 | $this->callContext = array ( 40 | 'codeLang' => Config::$CODE_LANG, 41 | 'poolAlias' => Config::$POOL_ALIAS, 42 | 'requestConfig' => "adxwss.optreturn=XML" 43 | ); 44 | } 45 | 46 | /** 47 | * 48 | * @param CAdxCallContext $callContext 49 | * @param string $publicName 50 | * @param string $inputXml 51 | * @return CAdxResultXml 52 | */ 53 | public function run($publicName, $inputXml) { 54 | return $this->soapClient->__soapCall ( 'run', array ( 55 | $this->callContext, 56 | $publicName, 57 | $inputXml 58 | ), array ( 59 | 'uri' => '', 60 | 'soapaction' => '' 61 | ) ); 62 | } 63 | // http://www.adonix.com/WSS 64 | /** 65 | * 66 | * @param CAdxCallContext $callContext 67 | * @param string $publicName 68 | * @param string $objectXml 69 | * @return CAdxResultXml 70 | */ 71 | public function save($publicName, $objectXml) { 72 | return $this->soapClient->__soapCall ( 'save', array ( 73 | $this->callContext, 74 | $publicName, 75 | $objectXml 76 | ), array ( 77 | 'uri' => 'http://www.adonix.com/WSS', 78 | 'soapaction' => '' 79 | ) ); 80 | } 81 | 82 | /** 83 | * 84 | * @param CAdxCallContext $callContext 85 | * @param string $publicName 86 | * @param ArrayOfCAdxParamKeyValue $objectKeys 87 | * @return CAdxResultXml 88 | */ 89 | public function delete($publicName, $objectKeys) { 90 | return $this->soapClient->__soapCall ( 'delete', array ( 91 | $this->callContext, 92 | $publicName, 93 | $objectKeys 94 | ), array ( 95 | 'uri' => 'http://www.adonix.com/WSS', 96 | 'soapaction' => '' 97 | ) ); 98 | } 99 | 100 | /** 101 | * 102 | * @param CAdxCallContext $callContext 103 | * @param string $publicName 104 | * @param ArrayOfCAdxParamKeyValue $objectKeys 105 | * @return CAdxResultXml 106 | */ 107 | public function read($publicName, $objectKeys) { 108 | return $this->soapClient->__soapCall ( 'read', array ( 109 | $this->callContext, 110 | $publicName, 111 | $objectKeys 112 | ), array ( 113 | 'uri' => 'http://www.adonix.com/WSS', 114 | 'soapaction' => '' 115 | ) ); 116 | } 117 | 118 | /** 119 | * 120 | * @param CAdxCallContext $callContext 121 | * @param string $publicName 122 | * @param ArrayOfCAdxParamKeyValue $objectKeys 123 | * @param int $listSize 124 | * @return CAdxResultXml 125 | */ 126 | public function query($publicName, $objectKeys, $listSize) { 127 | return $this->soapClient->__soapCall ( 'query', array ( 128 | $this->callContext, 129 | $publicName, 130 | $objectKeys, 131 | $listSize 132 | ), array ( 133 | 'uri' => 'http://www.adonix.com/WSS', 134 | 'soapaction' => '' 135 | ) 136 | ); 137 | 138 | } 139 | 140 | /** 141 | * 142 | * @param CAdxCallContext $callContext 143 | * @param string $publicName 144 | * @return CAdxResultXml 145 | */ 146 | public function getDescription($publicName) { 147 | return $this->soapClient->__soapCall ( 'getDescription', array ( 148 | $this->callContext, 149 | $publicName 150 | ), array ( 151 | 'uri' => 'http://www.adonix.com/WSS', 152 | 'soapaction' => '' 153 | ) ); 154 | } 155 | 156 | /** 157 | * 158 | * @param CAdxCallContext $callContext 159 | * @param string $publicName 160 | * @param ArrayOfCAdxParamKeyValue $objectKeys 161 | * @param string $objectXml 162 | * @return CAdxResultXml 163 | */ 164 | public function modify($publicName, $objectKeys, $objectXml) { 165 | return $this->soapClient->__soapCall ( 'modify', array ( 166 | $this->callContext, 167 | $publicName, 168 | $objectKeys, 169 | $objectXml 170 | ), array ( 171 | 'uri' => 'http://www.adonix.com/WSS', 172 | 'soapaction' => '' 173 | ) ); 174 | } 175 | 176 | /** 177 | * 178 | * @param CAdxCallContext $callContext 179 | * @param string $publicName 180 | * @param string $actionCode 181 | * @param ArrayOfCAdxParamKeyValue $objectKeys 182 | * @return CAdxResultXml 183 | */ 184 | public function actionObject($callContext, $publicName, $actionCode, $objectKeys) { 185 | return $this->soapClient->__soapCall ( 'actionObject', array ( 186 | $callContext, 187 | $publicName, 188 | $actionCode, 189 | $objectKeys 190 | ), array ( 191 | 'uri' => 'http://www.adonix.com/WSS', 192 | 'soapaction' => '' 193 | ) ); 194 | } 195 | 196 | /** 197 | * 198 | * @param CAdxCallContext $callContext 199 | * @param string $publicName 200 | * @param ArrayOfCAdxParamKeyValue $objectKeys 201 | * @param string $blocKey 202 | * @param ArrayOf_xsd_string $lineKeys 203 | * @return CAdxResultXml 204 | */ 205 | public function deleteLines($callContext, $publicName, $objectKeys, $blocKey, $lineKeys) { 206 | return $this->soapClient->__soapCall ( 'deleteLines', array ( 207 | $callContext, 208 | $publicName, 209 | $objectKeys, 210 | $blocKey, 211 | $lineKeys 212 | ), array ( 213 | 'uri' => 'http://www.adonix.com/WSS', 214 | 'soapaction' => '' 215 | ) ); 216 | } 217 | 218 | /** 219 | * 220 | * @param CAdxCallContext $callContext 221 | * @param string $publicName 222 | * @param ArrayOfCAdxParamKeyValue $objectKeys 223 | * @param string $blocKey 224 | * @param string $lineKey 225 | * @param string $lineXml 226 | * @return CAdxResultXml 227 | */ 228 | public function insertLines($callContext, $publicName, $objectKeys, $blocKey, $lineKey, $lineXml) { 229 | return $this->soapClient->__soapCall ( 'insertLines', array ( 230 | $callContext, 231 | $publicName, 232 | $objectKeys, 233 | $blocKey, 234 | $lineKey, 235 | $lineXml 236 | ), array ( 237 | 'uri' => 'http://www.adonix.com/WSS', 238 | 'soapaction' => '' 239 | ) ); 240 | } 241 | 242 | /** 243 | * 244 | * @param CAdxCallContext $callContext 245 | * @param string $publicName 246 | * @return CAdxResultXml 247 | */ 248 | public function getDataXmlSchema($callContext, $publicName) { 249 | return $this->soapClient->__soapCall ( 'getDataXmlSchema', array ( 250 | $callContext, 251 | $publicName 252 | ), array ( 253 | 'uri' => 'http://www.adonix.com/WSS', 254 | 'soapaction' => '' 255 | ) ); 256 | } 257 | } 258 | ?> 259 | 260 | -------------------------------------------------------------------------------- /WebServiceSOAP/models/Order.php: -------------------------------------------------------------------------------- 1 | key = "SOHNUM"; 21 | $cle->value = $crit; 22 | //echo("oma");echo($cle->key); 23 | //echo("oma");echo($cle->value); 24 | $this->CAdxResultXml = $this->read (Config::$WS_ORDER, Array($cle) ); 25 | if ($this->CAdxResultXml->status==0) { 26 | return ToolsWS::getSucces("No result"); 27 | } 28 | $resultXml = $this->CAdxResultXml->resultXml; 29 | // $result contient le fichier XML des réponses 30 | 31 | 32 | $dom = new DomDocument (); 33 | $dom->loadXML ( $resultXml ); 34 | // $xpath = new DOMXpath($dom); 35 | 36 | $str = ""; 37 | // header 38 | $fld = $dom->getElementsByTagName ( 'FLD' ); 39 | $str .= "
"; 40 | 41 | foreach ( $fld as $f ) { 42 | 43 | $val = $f->getAttribute ( 'NAME' ); 44 | if (in_array ( $val, $listFieldHeader )) { 45 | $val2 = $f->nodeValue; 46 | 47 | if ($val == "SOHNUM") { 48 | $str .= "
"; 49 | $str .= ""; 50 | $str .= ""; 52 | $str .= $val2; 53 | $str .= "' disabled >"; 54 | } elseif ($val == "BPCORD") { 55 | $str .= "
"; 56 | $str .= ""; 57 | $str .= ""; 60 | } elseif ($val == "ORDDAT") { 61 | $str .= "
"; 62 | $str .= ""; 63 | $str .= ""; 68 | } elseif ($val == "CUSORDREF") { 69 | $str .= "
"; 70 | $str .= ""; 71 | $str .= ""; 74 | } elseif ($val == "SALFCY") { 75 | $str .= "
"; 76 | $str .= ""; 77 | $str .= ""; 80 | } elseif ($val == "BPCNAM") { 81 | $str .= "
"; 82 | $str .= ""; 83 | $str .= ""; 86 | } 87 | $str .= "
"; 88 | } 89 | } 90 | $str .= "
"; 91 | $str .= "
"; 92 | // Lines 93 | $RES = $dom->getElementsByTagName ( 'LIN' ); 94 | 95 | // $str.=""; 96 | // $str.="getElementsByTagName ( 'FLD' ); 105 | // echo ""; 106 | $str .= ""; 107 | foreach ( $commande as $c ) { 108 | $val = $c->getAttribute ( 'NAME' ); 109 | if (in_array ( $val, $listFieldLines )) { 110 | // echo ""; 111 | $str .= ""; 112 | 113 | $val2 = $c->nodeValue; 114 | 115 | $str .= $c->nodeValue; 116 | 117 | $str .= ""; 118 | } 119 | } 120 | $str .= ""; 121 | } 122 | $str .= ""; 123 | $str .= "
"; 124 | 125 | return $str; 126 | } 127 | 128 | function showListe() { 129 | $WS = "*"; 130 | $this->CAdxResultXml = $this->query ( Config::$WS_ORDER, $WS, 100 ); 131 | //var_dump($this->soapClient->__getLastRequestHeaders()); 132 | $result = $this->CAdxResultXml->resultXml; 133 | // $result contient le fichier XML des réponses 134 | $dom = new DomDocument (); 135 | $dom->loadXML ( $result ); 136 | $RES = $dom->getElementsByTagName ( 'LIN' ); 137 | $str = ""; 138 | $str .= ""; 139 | 140 | foreach ( $RES as $R ) { 141 | $commande = $R->getElementsByTagName ( 'FLD' ); 142 | $str .= ""; 143 | foreach ( $commande as $c ) { 144 | $str .= ""; 167 | } 168 | $str .= ""; 169 | } 170 | $str .= "
Order numClientOrder dateReferenceSales repDelivery statusPostal code
"; 145 | $val = $c->getAttribute ( 'NAME' ); 146 | $val2 = $c->nodeValue; 147 | if ($val == "SOHNUM") { 148 | $str .= ""; 149 | $str .= $c->nodeValue; 150 | $str .= ""; 151 | } elseif ($val == "DLVSTA") { 152 | switch ($c->nodeValue) { 153 | case 1 : 154 | $str .= "Not delivered"; 155 | break; 156 | case 2 : 157 | $str .= "Partially delivered"; 158 | break; 159 | case 3 : 160 | $str .= "Delivered"; 161 | break; 162 | } 163 | } else { 164 | $str .= $c->nodeValue; 165 | } 166 | $str .= "
"; 171 | $str .= "
"; 172 | 173 | return $str; 174 | } 175 | 176 | function create($WS) { 177 | $this->CAdxResultXml = $this->save ( Config::$WS_ORDER, $WS ); 178 | $adxResultXml = $this->CAdxResultXml; 179 | $ret=""; 180 | $messages = array(); 181 | $status = $adxResultXml->status; 182 | if ($status == 1) { 183 | $ret.=ToolsWS::getSucces('Order created'); 184 | //return $ret; 185 | // echo "order créée
"; 186 | } else { 187 | $ret.=ToolsWS::getError('Order not created'); 188 | //return $ret; 189 | // echo "Erreur, commande non créée
"; 190 | } 191 | 192 | // echo "Messages:
"; 193 | if (property_exists(get_class($adxResultXml), 'messages')){ 194 | $messages = $adxResultXml->messages; 195 | 196 | foreach ( $messages as $value ) { 197 | $ret .= $value->message; 198 | $ret .= "
"; 199 | } 200 | } 201 | // echo "resultXml
"; 202 | // echo "$result2->resultXml
"; 203 | if ($status == 0) { 204 | return $ret; 205 | } 206 | $dom = new DomDocument (); 207 | $resultXml = $adxResultXml->resultXml; 208 | $dom->loadXML ( $resultXml ); 209 | 210 | 211 | $fld = $dom->getElementsByTagName ( 'FLD' ); 212 | $ret .= "
"; 213 | 214 | foreach ( $fld as $f ) { 215 | $val = $f->getAttribute ( 'NAME' ); 216 | $val2 = $f->nodeValue; 217 | if ($val == "SOHNUM") { 218 | $ret .= "
"; 219 | $ret .= ""; 220 | $ret .=""; 221 | $ret .="
Order num
".$val2.""; 222 | $ret .="
"; 223 | } 224 | } 225 | return $ret; 226 | } 227 | 228 | } 229 | 230 | ?> 231 | -------------------------------------------------------------------------------- /vendor/firebase/php-jwt/src/CachedKeySet.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | class CachedKeySet implements ArrayAccess 20 | { 21 | /** 22 | * @var string 23 | */ 24 | private $jwksUri; 25 | /** 26 | * @var ClientInterface 27 | */ 28 | private $httpClient; 29 | /** 30 | * @var RequestFactoryInterface 31 | */ 32 | private $httpFactory; 33 | /** 34 | * @var CacheItemPoolInterface 35 | */ 36 | private $cache; 37 | /** 38 | * @var ?int 39 | */ 40 | private $expiresAfter; 41 | /** 42 | * @var ?CacheItemInterface 43 | */ 44 | private $cacheItem; 45 | /** 46 | * @var array> 47 | */ 48 | private $keySet; 49 | /** 50 | * @var string 51 | */ 52 | private $cacheKey; 53 | /** 54 | * @var string 55 | */ 56 | private $cacheKeyPrefix = 'jwks'; 57 | /** 58 | * @var int 59 | */ 60 | private $maxKeyLength = 64; 61 | /** 62 | * @var bool 63 | */ 64 | private $rateLimit; 65 | /** 66 | * @var string 67 | */ 68 | private $rateLimitCacheKey; 69 | /** 70 | * @var int 71 | */ 72 | private $maxCallsPerMinute = 10; 73 | /** 74 | * @var string|null 75 | */ 76 | private $defaultAlg; 77 | 78 | public function __construct( 79 | string $jwksUri, 80 | ClientInterface $httpClient, 81 | RequestFactoryInterface $httpFactory, 82 | CacheItemPoolInterface $cache, 83 | int $expiresAfter = null, 84 | bool $rateLimit = false, 85 | string $defaultAlg = null 86 | ) { 87 | $this->jwksUri = $jwksUri; 88 | $this->httpClient = $httpClient; 89 | $this->httpFactory = $httpFactory; 90 | $this->cache = $cache; 91 | $this->expiresAfter = $expiresAfter; 92 | $this->rateLimit = $rateLimit; 93 | $this->defaultAlg = $defaultAlg; 94 | $this->setCacheKeys(); 95 | } 96 | 97 | /** 98 | * @param string $keyId 99 | * @return Key 100 | */ 101 | public function offsetGet($keyId): Key 102 | { 103 | if (!$this->keyIdExists($keyId)) { 104 | throw new OutOfBoundsException('Key ID not found'); 105 | } 106 | return JWK::parseKey($this->keySet[$keyId], $this->defaultAlg); 107 | } 108 | 109 | /** 110 | * @param string $keyId 111 | * @return bool 112 | */ 113 | public function offsetExists($keyId): bool 114 | { 115 | return $this->keyIdExists($keyId); 116 | } 117 | 118 | /** 119 | * @param string $offset 120 | * @param Key $value 121 | */ 122 | public function offsetSet($offset, $value): void 123 | { 124 | throw new LogicException('Method not implemented'); 125 | } 126 | 127 | /** 128 | * @param string $offset 129 | */ 130 | public function offsetUnset($offset): void 131 | { 132 | throw new LogicException('Method not implemented'); 133 | } 134 | 135 | /** 136 | * @return array 137 | */ 138 | private function formatJwksForCache(string $jwks): array 139 | { 140 | $jwks = json_decode($jwks, true); 141 | 142 | if (!isset($jwks['keys'])) { 143 | throw new UnexpectedValueException('"keys" member must exist in the JWK Set'); 144 | } 145 | 146 | if (empty($jwks['keys'])) { 147 | throw new InvalidArgumentException('JWK Set did not contain any keys'); 148 | } 149 | 150 | $keys = []; 151 | foreach ($jwks['keys'] as $k => $v) { 152 | $kid = isset($v['kid']) ? $v['kid'] : $k; 153 | $keys[(string) $kid] = $v; 154 | } 155 | 156 | return $keys; 157 | } 158 | 159 | private function keyIdExists(string $keyId): bool 160 | { 161 | if (null === $this->keySet) { 162 | $item = $this->getCacheItem(); 163 | // Try to load keys from cache 164 | if ($item->isHit()) { 165 | // item found! retrieve it 166 | $this->keySet = $item->get(); 167 | // If the cached item is a string, the JWKS response was cached (previous behavior). 168 | // Parse this into expected format array instead. 169 | if (\is_string($this->keySet)) { 170 | $this->keySet = $this->formatJwksForCache($this->keySet); 171 | } 172 | } 173 | } 174 | 175 | if (!isset($this->keySet[$keyId])) { 176 | if ($this->rateLimitExceeded()) { 177 | return false; 178 | } 179 | $request = $this->httpFactory->createRequest('GET', $this->jwksUri); 180 | $jwksResponse = $this->httpClient->sendRequest($request); 181 | if ($jwksResponse->getStatusCode() !== 200) { 182 | throw new UnexpectedValueException( 183 | sprintf('HTTP Error: %d %s for URI "%s"', 184 | $jwksResponse->getStatusCode(), 185 | $jwksResponse->getReasonPhrase(), 186 | $this->jwksUri, 187 | ), 188 | $jwksResponse->getStatusCode() 189 | ); 190 | } 191 | $this->keySet = $this->formatJwksForCache((string) $jwksResponse->getBody()); 192 | 193 | if (!isset($this->keySet[$keyId])) { 194 | return false; 195 | } 196 | 197 | $item = $this->getCacheItem(); 198 | $item->set($this->keySet); 199 | if ($this->expiresAfter) { 200 | $item->expiresAfter($this->expiresAfter); 201 | } 202 | $this->cache->save($item); 203 | } 204 | 205 | return true; 206 | } 207 | 208 | private function rateLimitExceeded(): bool 209 | { 210 | if (!$this->rateLimit) { 211 | return false; 212 | } 213 | 214 | $cacheItem = $this->cache->getItem($this->rateLimitCacheKey); 215 | if (!$cacheItem->isHit()) { 216 | $cacheItem->expiresAfter(1); // # of calls are cached each minute 217 | } 218 | 219 | $callsPerMinute = (int) $cacheItem->get(); 220 | if (++$callsPerMinute > $this->maxCallsPerMinute) { 221 | return true; 222 | } 223 | $cacheItem->set($callsPerMinute); 224 | $this->cache->save($cacheItem); 225 | return false; 226 | } 227 | 228 | private function getCacheItem(): CacheItemInterface 229 | { 230 | if (\is_null($this->cacheItem)) { 231 | $this->cacheItem = $this->cache->getItem($this->cacheKey); 232 | } 233 | 234 | return $this->cacheItem; 235 | } 236 | 237 | private function setCacheKeys(): void 238 | { 239 | if (empty($this->jwksUri)) { 240 | throw new RuntimeException('JWKS URI is empty'); 241 | } 242 | 243 | // ensure we do not have illegal characters 244 | $key = preg_replace('|[^a-zA-Z0-9_\.!]|', '', $this->jwksUri); 245 | 246 | // add prefix 247 | $key = $this->cacheKeyPrefix . $key; 248 | 249 | // Hash keys if they exceed $maxKeyLength of 64 250 | if (\strlen($key) > $this->maxKeyLength) { 251 | $key = substr(hash('sha256', $key), 0, $this->maxKeyLength); 252 | } 253 | 254 | $this->cacheKey = $key; 255 | 256 | if ($this->rateLimit) { 257 | // add prefix 258 | $rateLimitKey = $this->cacheKeyPrefix . 'ratelimit' . $key; 259 | 260 | // Hash keys if they exceed $maxKeyLength of 64 261 | if (\strlen($rateLimitKey) > $this->maxKeyLength) { 262 | $rateLimitKey = substr(hash('sha256', $rateLimitKey), 0, $this->maxKeyLength); 263 | } 264 | 265 | $this->rateLimitCacheKey = $rateLimitKey; 266 | } 267 | } 268 | } 269 | -------------------------------------------------------------------------------- /WebServiceSOAP/models/Product.php: -------------------------------------------------------------------------------- 1 | key = "ITMREF"; 20 | $cle->value = $crit; 21 | //echo("oma");echo($cle->key); 22 | //echo("oma");echo($cle->value); 23 | $this->CAdxResultXml = $this->read ( Config::$WS_PRODUCT, Array ( 24 | $cle 25 | ) ); 26 | if ($this->CAdxResultXml->status == 0) { 27 | return ToolsWS::getSucces ( "No result" ); 28 | } 29 | $resultXml = $this->CAdxResultXml->resultXml; 30 | // $result contient le fichier XML des réponses 31 | 32 | $dom = new DomDocument (); 33 | $dom->loadXML ( $resultXml ); 34 | // $xpath = new DOMXpath($dom); 35 | 36 | $str = ""; 37 | // header 38 | $fld = $dom->getElementsByTagName ( 'FLD' ); 39 | $str .= "
"; 40 | foreach ( $fld as $f ) { 41 | $val = $f->getAttribute ( 'NAME' ); 42 | if ( $val == "IMG") { 43 | $val2 = $f->nodeValue; 44 | $str .= "
"; 45 | $str .= ""; 46 | $str .= "
"; 47 | } 48 | } 49 | foreach ( $fld as $f ) { 50 | 51 | $val = $f->getAttribute ( 'NAME' ); 52 | if (in_array ( $val, $listFieldHeader )) { 53 | $val2 = $f->nodeValue; 54 | 55 | if ($val == "ITMREF") { 56 | $str .= "
"; 57 | $str .= ""; 58 | $str .= ""; 60 | $str .= $val2; 61 | $str .= "' disabled >"; 62 | } elseif ($val == "DES1AXX") { 63 | $str .= "
"; 64 | $str .= ""; 65 | $str .= ""; 68 | } elseif ($val == "TCLCOD") { 69 | $str .= "
"; 70 | $str .= ""; 71 | $str .= ""; 74 | } elseif ($val == "ITMSTA") { 75 | $str .= "
"; 76 | $str .= ""; 77 | $str .= ""; 80 | } elseif ($val == "EANCOD") { 81 | $str .= "
"; 82 | $str .= ""; 83 | $str .= ""; 86 | } elseif ($val == "SEAKEY") { 87 | $str .= "
"; 88 | $str .= ""; 89 | $str .= ""; 92 | } 93 | $str .= "
"; 94 | } 95 | } 96 | $str .= "
"; 97 | $str .= "
"; 98 | // Lines 99 | $RES = $dom->getElementsByTagName ( 'LIN' ); 100 | 101 | // $str.=""; 102 | // $str.="getElementsByTagName ( 'FLD' ); 111 | // echo ""; 112 | $str .= ""; 113 | foreach ( $product as $p ) { 114 | $val = $p->getAttribute ( 'NAME' ); 115 | if (in_array ( $val, $listFieldLines )) { 116 | // echo ""; 117 | $str .= ""; 118 | 119 | $val2 = $p->nodeValue; 120 | 121 | $str .= $p->nodeValue; 122 | 123 | $str .= ""; 124 | } 125 | } 126 | $str .= ""; 127 | } 128 | $str .= ""; 129 | $str .= "
"; 130 | 131 | return $str; 132 | } 133 | function showListe() { 134 | //$WS = ""; 135 | $WS = new CAdxParamKeyValue (); 136 | $WS->key = "ITMSTA"; 137 | $WS->value = "<>5"; 138 | $this->CAdxResultXml = $this->query ( Config::$WS_PRODUCT, Array ($WS) , 100 ); 139 | $result = $this->CAdxResultXml->resultXml; 140 | // $result contient le fichier XML des réponses 141 | $dom = new DomDocument (); 142 | $dom->loadXML ( $result ); 143 | $RES = $dom->getElementsByTagName ( 'LIN' ); 144 | $str = ""; 145 | $str .= ""; 146 | 147 | foreach ( $RES as $R ) { 148 | $product = $R->getElementsByTagName ( 'FLD' ); 149 | $str .= ""; 150 | foreach ( $product as $p ) { 151 | $str .= ""; 183 | } 184 | $str .= ""; 185 | } 186 | $str .= "
Product numDescriptionCategoryProduct statusEAN codeSearch key
"; 152 | $val = $p->getAttribute ( 'NAME' ); 153 | $val2 = $p->nodeValue; 154 | if ($val == "ITMREF") { 155 | $str .= ""; 156 | $str .= $p->nodeValue; 157 | $str .= ""; 158 | } elseif ($val == "ITMSTA") { 159 | switch ($p->nodeValue) { 160 | case 1 : 161 | $str .= "Active"; 162 | break; 163 | case 2 : 164 | $str .= "In development"; 165 | break; 166 | case 3 : 167 | $str .= "Shortage"; 168 | break; 169 | case 4 : 170 | $str .= "Not Renewed"; 171 | break; 172 | case 5 : 173 | $str .= "Obsolete"; 174 | break; 175 | case 6 : 176 | $str .= "Not Usable"; 177 | break; 178 | } 179 | } else { 180 | $str .= $p->nodeValue; 181 | } 182 | $str .= "
"; 187 | $str .= "
"; 188 | 189 | return $str; 190 | } 191 | function create($WS) { 192 | $this->CAdxResultXml = $this->save ( Config::$WS_ORDER, $WS ); 193 | $adxResultXml = $this->CAdxResultXml; 194 | $ret = ""; 195 | $messages = array (); 196 | $status = $adxResultXml->status; 197 | if ($status == 1) { 198 | $ret .= ToolsWS::getSucces ( 'Order created' ); 199 | // return $ret; 200 | // echo "order créée
"; 201 | } else { 202 | $ret .= ToolsWS::getError ( 'Order not created' ); 203 | // return $ret; 204 | // echo "Erreur, commande non créée
"; 205 | } 206 | 207 | // echo "Messages:
"; 208 | if (property_exists ( get_class ( $adxResultXml ), 'messages' )) { 209 | $messages = $adxResultXml->messages; 210 | 211 | foreach ( $messages as $value ) { 212 | $ret .= $value->message; 213 | $ret .= "
"; 214 | } 215 | } 216 | // echo "resultXml
"; 217 | // echo "$result2->resultXml
"; 218 | if ($status == 0) { 219 | return $ret; 220 | } 221 | $dom = new DomDocument (); 222 | $resultXml = $adxResultXml->resultXml; 223 | $dom->loadXML ( $resultXml ); 224 | 225 | $fld = $dom->getElementsByTagName ( 'FLD' ); 226 | $ret .= "
"; 227 | 228 | foreach ( $fld as $f ) { 229 | $val = $f->getAttribute ( 'NAME' ); 230 | $val2 = $f->nodeValue; 231 | if ($val == "SOHNUM") { 232 | $ret .= "
"; 233 | $ret .= ""; 234 | $ret .= ""; 235 | $ret .= "
Order num
" . $val2 . ""; 236 | $ret .= "
"; 237 | } 238 | } 239 | return $ret; 240 | } 241 | } 242 | 243 | ?> 244 | --------------------------------------------------------------------------------