/** * onBrowse * * @param string $tpl Param * * @return bool */ protected function onBrowse($tpl = null) { Extly::loadAwesome(); GridHelper::loadComponentInfo($this); GridHelper::loadStats($this); GridHelper::loadStatsTimeline($this); $document = JFactory::getDocument(); $document->addScript('//cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js'); $document->addScript('//cdnjs.cloudflare.com/ajax/libs/nvd3/1.7.0/nv.d3.min.js'); $document->addStyleSheet('//cdnjs.cloudflare.com/ajax/libs/nvd3/1.7.0/nv.d3.min.css'); // Get component parameter - Offline mode $version_check = EParameter::getComponentParam(CAUTOTWEETNG, 'version_check', 1); $this->assign('version_check', $version_check); $platform = F0FPlatform::getInstance(); if ($version_check && $platform->isBackend()) { $file = EHtml::getRelativeFile('js', 'com_autotweet/liveupdate.min.js'); if ($file) { $dependencies = array(); $dependencies['liveupdate'] = array('extlycore'); Extly::initApp(CAUTOTWEETNG_VERSION, $file, $dependencies); } } parent::onBrowse($tpl); }
<?php include '../core/Page.php'; $p = new Page(); $g = new GridHelper(); $g->table->tag['cellspacing'] = 0; $g->table->tag['cellpadding'] = 0; $g->td->Border("solid", "black", "1px"); $g->td->styling['padding'] = '5px'; $g->td->styling['margin'] = 0; $g->table->styling['font-size'] = '50%'; // $g->td->BGColor( "orange" ); $g->Size(100, 100); $g->Heading(0, "One"); $g->Heading(1, "Two"); $g->Heading(2, "Three"); $g->Heading(3, "Four"); $highlighter = new GridPen(); $highlighter->operation = 3; $highlighter->bg->SetRGB(1, 1, 0); $highlighter->fg->SetRGB(0, 1, 1); $highlighter->blend = '='; $hi2 = new GridPen(); $hi2->operation = 3; $hi2->fg->SetRGB(1, 1, 0); $hi2->bg->SetRGB(0, 1, 1); $hi2->blend = '='; $g->EvenOddRow($highlighter, $hi2, 4); $highlighter->operation = 3; $highlighter->bg->SetRGB(0.9, 0.1, 1.0); $highlighter->fg->SetRGB(0.9, 0.8, 0.0);
if ($this->d1 != 1 && !isset($this->visited[join(",", array($this->d1 - 1, $this->d2))])) { array_push($x, array($this->d1 - 1, $this->d2)); } if ($this->d1 != 4 && !isset($this->visited[join(",", array($this->d1 + 1, $this->d2))])) { array_push($x, array($this->d1 + 1, $this->d2)); } if ($this->d2 != 1 && !isset($this->visited[join(",", array($this->d1, $this->d2 - 1))])) { array_push($x, array($this->d1, $this->d2 - 1)); } if ($this->d2 != 4 && !isset($this->visited[join(",", array($this->d1, $this->d2 + 1))])) { array_push($x, array($this->d1, $this->d2 + 1)); } $l = count($x); $new_point_array = array(0, 0); //Default is no choice if ($l > 0) { //If the length of X is > 0, we have choices. shuffle($x); $new_point_array = $x[array_rand($x, 1)]; $this->d1 = $new_point_array[0]; $this->d2 = $new_point_array[1]; $new_point_array_as_string = join(",", $new_point_array); $this->visited[$new_point_array_as_string] = true; $this->path .= $new_point_array_as_string . " "; } return $new_point_array; } } $g = new GridHelper(); print $g->seek() . "\n"; exit;
<td><span class="channel-<?php echo $item->channel_id; ?> "></span> <?php echo $item->channel_id ? SelectControlHelper::getChannelName($item->channel_id, $this->isModule) : '—'; ?> </td> <td> <div rel="tooltip" data-original-title="<?php $result = htmlentities(JText::_($item->resultmsg), ENT_COMPAT, 'UTF-8'); echo $result; ?> "> <?php echo GridHelper::pubstates($item, $i, $this->isModule); ?> </div> </td> <?php if (!$this->isModule) { ?> <td><?php echo AutoTweetModelPlugins::getSimpleName($item->plugin); ?> </td> <td><?php echo $item->id;