public function createResourceHtml() { global $connection; $resources = getResources($connection); $content = '<thead><tr><th>ID</th><th>RESOURCE</th></tr></thead>'; foreach ($resources as $key => $value) { $content = $content . '<tr><td>' . $value['id'] . '</td><td>' . $value['resource'] . '</td></tr>'; } return $content; }
</body> </html> <?php //------------ Output the sample into /draft/index.htm for debugging on mobile -------- ob_start(); ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Highcharts Sample</title> <?php echo getFramework(FRAMEWORK); ?> <?php echo getResources(); ?> <script type="text/javascript"> <?php @(include "{$fullpath}/demo.js"); ?> </script> <style type="text/css"> <?php @(include "{$fullpath}/demo.css"); ?> </style> </head> <body style="margin: 0">
$app->error($e); } }); $app->get('/history/:startFrom', function ($startFrom) use($app, $config, $connection_name) { try { $app->response->headers->set('Content-Type', 'application/json'); include '../app/functions.feed.php'; echo feedhistory($connection_name, $startFrom); } catch (\Exception $e) { $app->error($e); } }); $app->get('/resources/:id(/:maxWidth)', function ($id, $maxWidth = 0) use($app, $config, $connection_name) { try { include '../app/functions.image.php'; $fp = getResources($config['uploads_dir'], $id, $maxWidth, $connection_name); if (!$fp) { $app->notFound(); } $app->response->headers->set('Content-Type', $fp['mime']); $app->response->setBody($fp['data']); } catch (\Exception $e) { $app->error($e); } }); $app->get('/annotation/new', function () use($app, $config, $connection_name) { try { include '../app/functions.web.php'; $app->render('annotation/form.php', array()); } catch (\Exception $e) { $app->error($e);
</aisde> <section class="[ column-9_12 column sc_column_item ][ resource-centre-results__section ]"> <?php $group_active = isset($_POST['group']) ? $_POST['group'] : 'ninguno'; ?> <article class="[ columns_wrap sc_columns sc_columns_count_12 columns_fluid ][ posts-container ]" data-group_active=".<?php echo $group_active; ?> "> <?php $query_resources = getResources($search); if (!empty($query_resources)) { foreach ($query_resources as $post) { setup_postdata($post); $meta = get_post_meta($post->ID, '_open_contribution_meta', true); $class_contri = $meta == 'yes' ? $meta . '-contribution ' : 'no-contribution '; $resource_info = get_resource_info($post->ID); $resource_filter_classes = $class_contri; foreach ($resource_info as $key => $value) { $resource_filter_classes .= $value . ' '; } ?> <div class="[ column-12_12 sc_column_item ][ post ][ <?php echo $resource_filter_classes; ?> ]">
function isMarked($resource, $privilege, $resourcePrivileges) { $flag = false; for ($i = 0; $i < count($resourcePrivileges); ++$i) { if ($resource == $resourcePrivileges[$i]['resource_id'] && $privilege == $resourcePrivileges[$i]['privilege_id']) { $flag = true; break; } else { $flag = false; } } return $flag; } if (isset($_SESSION['pk_admin'])) { $roles = getRoles($connection); $resources = getResources($connection); $privileges = getPrivileges($connection); if (isset($_POST['role'])) { $roleId = getId('role', $_POST['role'], 'roles'); $resourcePrivileges = getResourcePrivileges($connection, $roleId); } else { $resourcePrivileges = getResourcePrivileges($connection, 1); } // draw a table for the page $content = '<thead><tr><th></th>'; // draw table header (row 1) foreach ($privileges as $key => $value) { $content = $content . '<th>' . $value['privilege'] . '</th>'; } $content = $content . '</tr></thead>'; // draw table content
$filenameCol = $mapper->getColByName("filename"); if ($filenameCol == null) { View::debug("Filename not provided", 1); } // check for files to exist // $ret = checkForFiles( $excel, $mapper->getColByName( "filename" ), $uploadsMap ); // if( $ret !== 0 ) { // View::debug( "Could not find file ".$ret, 1 ); // // break; // } $xml_source = null; $md5r = null; // generate all Resources $rowErrors = array(); $rowWarnings = array(); $res = getResources($excel, $mapper, $template, $uploadsMap, $rowErrors, $rowWarnings); $rowsValid = rowValidator($rowErrors, $rowWarnings); if ($filesystemValid === 0 && $tableValid === 0 && $rowsValid === 0) { // transform to XML format $xml = transformToXML($res); $xml->save($excel->getSource() . ".xml"); // echo $xml->saveXML(); //$xml->saveXML();//proftpd //pathinfo string [] $xml_source = $xml->saveXML(); $xml_source = escape_check($xml_source); $xml_source = str_replace("\\n", "", $xml_source); $md5r = md5($scramble_key . $xml_source); // echo $scramble_key; foreach ($res as $r) { $r->updateResource(); }
function getResource($key) { $resource = isAke(getResources(), $key, curl_init()); return unserialize(curl_getinfo($resource, CURLINFO_PRIVATE)); }