function product($num) { printName('Product'); $product = Bigcommerce::getProduct($num); echo $product->name . '<br>'; echo $product->price . '<br><br>'; }
function printMonster($row) { $className = classBox($row); ?> <div class="<?php echo $className; ?> "> <div class="banner-name"> <div class="name-monster"><?php printName($row); ?> </div> <?php buttonOwn($row); ?> <?php buttonCatch($row); ?> </div> <div class="content"> <div class="img-monster" style = "background-image: url('images/monsters/<?php echo $row['id']; ?> .png');"> <?php printImage($row); ?> </div> <div class="info"> <div class="monster-name"><?php echo $row['monster']; ?> </div> <?php printPrice($row); ?> <span class="zone"><?php printZone($row); ?> </span> <div class="indication"><?php echo printIndication($row); ?> </div> </div> </div> </div><?php }
printName('value', $value); printName('power', $status); } } } if ($argument2 != "0") { $lat2 = $row["lat"]; $lon2 = $row["lon"]; printName("lon", $lon2); printName("lat", $lat2); if (isset($_GET['lat']) && isset($_GET['lon'])) { $lat1 = $_GET['lat']; $lon1 = $_GET['lon']; printName("distance", $vafstand); $bearing = (rad2deg(atan2(sin(deg2rad($lon2) - deg2rad($lon1)) * cos(deg2rad($lat2)), cos(deg2rad($lat1)) * sin(deg2rad($lat2)) - sin(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($lon2) - deg2rad($lon1)))) + 360) % 360; printName("bearing", $bearing); } } $xml_output .= "</item>\n"; } } } else { $xml_output .= "wrong value!"; } $xml_output .= "</items>"; mysqli_close($conn); echo $xml_output; } else { if (!isset($_GET['arg1'])) { $error .= "argument1 not given."; }
var mapChart; var optionsEstados; var graficoDisponibilidadPorEstados; var graficoDisponibilidadPorEstadosTitulo="% Global availability agents of the past 7 days by standard time zones"; var graficoDisponibilidadWashingtonTitulo="% First 7 global availability agents of the past 7 days in Washington"; var graficoDisponibilidadCaliforniaTitulo="% First 7 global availability agents of the past 7 days in California"; var graficoDisponibilidadOregonTitulo="% First 7 global availability agents of the past 7 days in Oregon"; var graficoDisponibilidadNewYorkTitulo="% First 7 global availability agents of the past 7 days in New York"; </script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/x-icon" href="favicon.ico" /> <title><?php echo printName(); ?> </title> <link rel="stylesheet" type="text/css" href="theme/css/bootstrap.org.min.css"/> <link rel="stylesheet" type="text/css" href="theme/css/bootstrap-baking.css"/> <link rel="stylesheet" type="text/css" href="theme/css/font-awesome.min.css"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> <script src="theme/js/jquery-1.11.1.min.js"></script> <script src="theme/js/bootstrap.min.js"></script> <script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/highcharts-more.js"></script>
<?php $name = "Akshay"; printName(); echo $name; function printName() { global $name; $name = "Akshay Nagpal"; }
printUpdateStatus('OK'); printName('Reparse design "' . $design->name . '"'); $edit_fns = $design->getEditFns(); if (!$edit_fns->parseAndProcessFile($design)) { printUpdateStatus('FAILED'); exit; } $design->generateDesignFile(false); printUpdateStatus('OK'); $customisation_links = $GLOBALS['SQ_SYSTEM']->am->getLinks($design->id, SQ_LINK_TYPE_2, 'design_customisation', true, 'major', 'customisation'); foreach ($customisation_links as $link) { $customisation = $GLOBALS['SQ_SYSTEM']->am->getAsset($link['minorid'], $link['minor_type_code']); if (is_null($customisation)) { continue; } printName('Reparse design customisation "' . $customisation->name . '"'); $vars = array('assetids' => array($customisation->id), 'lock_type' => 'all', 'forceably_acquire' => false); $errors = $hh->freestyleHipo('hipo_job_acquire_locks', $vars); if (!empty($errors)) { printUpdateStatus('LOCK FAILED'); $GLOBALS['SQ_SYSTEM']->am->forgetAsset($design); exit; } if ($acquired = $GLOBALS['SQ_SYSTEM']->am->acquireLock($customisation->id, 'all')) { if (!$customisation->updateFromParent($design)) { printUpdateStatus('FAILED'); continue; } if ($acquired != 2) { $GLOBALS['SQ_SYSTEM']->am->releaseLock($customisation->id, 'all'); }
$ok = MatrixDAL::executeSql($sql); if ($ok === false) { printUpdateStatus('Failure, unable to run query: ' . $sql); exit; } printUpdateStatus('OK'); } } // end foreach } //end if } pre_echo('Rebuilding Sequences'); foreach ($info['sequences'] as $sequence) { $new_seq_start = $sequence_values[$sequence]; printName('Creating sq_' . $sequence . '_seq (' . $new_seq_start . ')'); $sql = 'CREATE SEQUENCE sq_' . $sequence . '_seq START WITH ' . $new_seq_start; $ok = MatrixDAL::executeSql($sql); if ($ok === false) { printUpdateStatus('Failure, unable to run query: ' . $sql); exit; } printUpdateStatus('OK'); } $first_run = false; } /** * Lastly, close all the db connections. */ MatrixDAL::restoreDb(); MatrixDAL::dbClose($dest_db);
} //end if if (!empty($table_info['unique_key'])) { foreach ($tables as $tablename) { $tablename = 'sq_' . $tablename; $idx_columns = $table_info['unique_key']; if (substr($tablename, 3, 3) == 'rb_') { array_unshift($idx_columns, 'sq_eff_from'); } /** * Indexes are named after the tablename _ first_col _key * eg * "sq_rb_ast_lnk_sq_eff_from_key" => (sq_eff_from, minorid, majorid, link_type, value) */ $full_idx_name = $tablename . '_' . $idx_columns[0] . '_key'; printName('Checking for index ' . $full_idx_name); $create_index_statement = create_index_sql($tablename, $idx_columns, $full_idx_name, NULL, false, true); $error = true; if (isset($full_index_list[$tablename][$full_idx_name])) { $error = false; } else { /** * Oracle has different semantics. * You can have unnamed keys, in which case it gives it a random name. * Eg 'sys_c0013508' * So we have to basically trawl through "unnamed" keys to see if they match. */ $temp_idx_cols = implode(',', $idx_columns); if (in_array($temp_idx_cols, $full_index_list[$tablename])) { $full_idx_name = array_search($temp_idx_cols, $full_index_list[$tablename]); $error = false;
/** * Pretty print a person */ function printPerson($person) { if (!$person) { return; } $personId = $person->getId(); $displayInfo = $person->getDisplayExtension(); ?> <h1><?php echo $displayInfo->getName(); ?> </h1> <h3>Display</h3> <div class="panel panel-default"> <table class="table"> <tr> <th>ID</th> <th>Gender</th> <th>Lifespan</th> <th>Living</th> </tr> <tr> <td><?php echo $personId; ?> </td> <td><?php echo $displayInfo->getGender(); ?> </td> <td><?php echo $displayInfo->getLifespan(); ?> </td> <td><?php echo $person->isLiving() ? 'Living' : 'Deceased'; ?> </td> </tr> <tr> <th>Birth Date</th> <th>Birth Place</th> <th>Death Date</th> <th>Death Place</th> </tr> <tr> <td><?php echo $displayInfo->getBirthDate(); ?> </td> <td><?php echo $displayInfo->getBirthPlace(); ?> </td> <td><?php echo $displayInfo->getDeathDate(); ?> </td> <td><?php echo $displayInfo->getDeathPlace(); ?> </td> </tr> </table> </div> <?php // Names echo '<h3>Names</h3>'; foreach ($person->getNames() as $name) { printName($name); } // Facts echo '<h3>Facts</h3>'; foreach ($person->getFacts() as $fact) { printFact($fact); } // Links to other sample app pages ?> <h3>Links</h3> <div class="row"> <div class="col-sm-2"> <a class="btn btn-default" href="/examples/ReadFamily.php?personId=<?php echo $personId; ?> ">Read Family</a> </div> <div class="col-sm-2"> <a class="btn btn-default" href="/examples/ReadAncestry.php?personId=<?php echo $personId; ?> ">Read Ancestry</a> </div> </div> <?php // Raw echo '<h3>Raw</h3>'; rawDump($person->toArray()); }