foreach ($trelloObjLists as $list) { if ($list->closed) { // ignore archived lists continue; } echo 'Creating list ' . $list->name . PHP_EOL; $columnId = $client->addColumn($projectId, $list->name); $trelloLists[$list->id] = $columnId; //add each card echo 'Adding cards.' . PHP_EOL; $query = "https://trello.com/1/lists/" . $list->id . "?key=" . $trellokey . "&token=" . $trellotoken . "&cards=open&card_fields=all&card_checklists=all&members=all&member_fields=all&membersInvited=all&checklists=all&organization=true&organization_fields=all&fields=all"; // &actions=commentCard,copyCommentCard&card_attachments=true"; $jsonCards = file_get_contents($query); $trelloObjCards = json_decode($jsonCards); foreach ($trelloObjCards->cards as $card) { addCard($projectId, $columnId, $card); } } echo 'All done!' . PHP_EOL; die; function addCard($projectId, $columnId, $card) { global $trellokey; global $trellotoken; global $trelloLabels; global $client; global $userId; if ($card->closed) { // ignore archived cards return; }
require 'raspi/Buzzer.php'; require 'raspi/Diode.php'; //scan card $buzzer = new Buzzer(); $buzzer->buzzStop(); $diode = new Diode(); $diode->off(); while (true) { echo "Wait for card...\n"; do { $uid = getNfcUID(); } while ($uid == NULL); echo "Insert {$uid} card\n"; $newCard = new stdClass(); $newCard->cardid = $uid; addCard($newCard); $buzzer->buzzStart(); $diode->on(); sleep(1); $buzzer->buzzStop(); echo "Remember take card back...\n"; while ($uid != NULL && getNfcUID() == $uid) { } $diode->off(); } function getNfcUID() { sleep(1); try { $match = []; $lsnfc = shell_exec('sudo lsnfc');
<select name="schoolsId" size="1"> <?php //через селект вытаскиваем тип по айди $schools_id = mysql_query("SELECT * FROM schools "); while ($result = mysql_fetch_array($schools_id)) { echo "<option select value =" . $result["id"] . ">" . $result['name'] . ""; } ?> </select><br/> <input type="text" name="grade" class="placeholder" placeholder="Класс"/><br/> <input type="text" name="email" class="placeholder" placeholder="Электронная почта"/><br/> <input type="text" name="phone" class="placeholder" placeholder="Телефон"/><br/> <input class="button_green" name="action" type="submit" style="width:200px" value="Подать заявку"/> <input type="hidden" name="action" value="reg" /> </form> <?php if (isset($_POST['action'])) { addCard(); } ?> </div> </div> <div id="footer">Copyright © 1999 – 2015 Институт математики и компьютерных наук.<br> Дальневосточный Федеральный Университет </div> </div> </body> </html>
###Dont bother with certificate verification### $client->setSSLVerifyPeer(FALSE); ###Our API Key### $key = "13643d3c8910057ce07623ed01bb22b2"; ############################################## ### Our Function to add a credit card ### ############################################## function addCard($CC) { global $client, $key; ###Set up the call to add the card### $call = new xmlrpcmsg("DataService.add", array(php_xmlrpc_encode($key), php_xmlrpc_encode("CreditCard"), php_xmlrpc_encode($CC))); ###Send the call### $result = $client->send($call); if (!$result->faultCode()) { $cardID = $result->value(); print "Credit Card added - ID: " . $cardID; print "<BR>"; } else { print $result->faultCode() . "<BR>"; print $result->faultString() . "<BR>"; } return $cardID; } ############################### ### Build the card data ### ############################### $card = array("ContactId" => 1300, "NameOnCard" => "FirstName LastName", "CardType" => "Visa", "CardNumber" => "4111111111111111", "ExpirationMonth" => "01", "ExpirationYear" => "2011", "CVV2" => "123"); ### Create the card and store its returned ID ### $CCID = addCard($card);