<?php /* Script para registrar información en la base de datos */ require_once 'functions.php'; if (isset($_POST['id']) and isset($_POST['registerData'])) { switch ($_POST['registerData']) { case 0: if (isset($_POST['group']) and isset($_POST['name']) and isset($_POST['period'])) { echo registerTask($_POST['group'], $_POST['name'], $_POST['period']); } else { echo "No proper data"; } break; case 1: if (isset($_POST['file']) and isset($_POST['groupName']) and isset($_POST['language']) and isset($_POST['teacher'])) { $class = registerGroup($_POST['groupName'], $_POST['language'], $_POST['teacher']); if ($_POST['file'] != '') { $inputFileName = './uploads/' . $_POST['file']; /** Include path **/ set_include_path(get_include_path() . PATH_SEPARATOR . './libs/php/PHPExcel/Classes/'); /** PHPExcel_IOFactory */ include 'PHPExcel/IOFactory.php'; $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); $sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true); foreach ($sheetData as $row) { $registerNo = $row['A']; $registerInfo['name'] = $row['B']; $registerInfo['type'] = 2; $registerInfo['pass'] = $registerNo;
/* Change Log: * * */ /* This program is part of "Baidu Darwin PHP Software"; you can redistribute it and/or * modify it under the terms of the Baidu General Private License as * published by Baidu Campus. * * You should have received a copy of the Baidu General Private License * along with this program; see the file COPYING. If not, write to * the Baidu Campus NO.10 Shangdi 10th Street Haidian District, Beijing The Peaple's * Republic of China, 100085. */ /* Code: */ require_once __DIR__ . "/bootstrap/cli.php"; registerTask('sample'); use BullSoft\Cart; //create toothbrush $itemA = new Cart\Item(); $itemA->setId(1)->setName('ToothBrush')->setSku('toothbrush-1')->setPrice('1.99')->setQty(3)->setIsTaxable(true)->setIsDiscountable(true); //create toothpaste $itemB = new Cart\Item(); $itemB->setId(2)->setName('ToothPaste')->setSku('toothpaste-2')->setPrice('2.99')->setQty(1)->setIsTaxable(true)->setIsDiscountable(true); $itemC = new Cart\Item(); $itemC->setId(3)->setName('Anniversary Present')->setSku('present-1')->setPrice('99.99')->setQty(1)->setIsTaxable(true)->setIsDiscountable(true); //create a shipment $shipmentA = new Cart\Shipment(); $shipmentA->setId(1)->setVendor('ups')->setMethod('ground')->setPrice('6.95')->setIsDiscountable(true)->setIsTaxable(true); $cart = new Cart\Cart(); $cart->setItem($itemA)->setItem($itemB)->setItem($itemC)->setShipment($shipmentA)->setIncludeTax(true)->setTaxRate('0.07025')->setId(3); //set up a single discount condition, for the shipping method