?> <a class="js_controlpanel_link" href="index.php?option=com_jsjobs&c=purchasehistory&view=purchasehistory&layout=employerpurchasehistory&Itemid=<?php echo $this->Itemid; ?> "> <img class="js_controlpanel_link_image" src="components/com_jsjobs/images/purchase_history.png" alt=" Employer Purchase History" /> <div class="js_controlpanel_link_text_wrapper"> <span class="js_controlpanel_link_title"><?php echo JText::_('JS_PURCHASE_HISTORY'); ?> </span> </div> </a> <?php } $print = checkLinks('my_stats', $userrole, $config, $emcontrolpanel); if ($print) { ?> <a class="js_controlpanel_link" href="index.php?option=com_jsjobs&c=employer&view=employer&layout=my_stats&Itemid=<?php echo $this->Itemid; ?> "> <img class="js_controlpanel_link_image" src="components/com_jsjobs/images/mystats.png" alt="My Stats" /> <div class="js_controlpanel_link_text_wrapper"> <span class="js_controlpanel_link_title"><?php echo JText::_('JS_MY_STATS'); ?> </span> </div> </a> <?php
function getBbcLinks($html) { $dom = new DOMDocument(); libxml_use_internal_errors(true); @$dom->loadHTMLFile($html); /* $toBeRemoved = "author_bottom_desc"; $toBeFiltered = new DomXPath($dom); foreach($toBeFiltered->query("//div[contains(@class,'$toBeRemoved')] ") as $r){ $r->parentNode->removeChild($r); }*/ $id_name = "media__link"; $xpath = new DomXPath($dom); $links = array(); foreach ($xpath->query("//h3//a[contains(@class, '{$id_name}')]//@href") as $r) { //echo $r->nodeValue."<br/>"; $links[] = $r->nodeValue; } $new_links = array(); foreach ($links as $link) { if (strpos($link, 'http://www.bbc.com/') !== false) { $new_links[] = $link; } } //echo "<pre>";print_r($new_links); echo "</pre>"; //check if links are unique $unique_urls = checkLinks($new_links); return $unique_urls; }
searchFrontContentLinks($value, $db->f("idart"), $db->f("title"), $db->f("idcat"), $db->f("namecat")); } } // How many articles exists? [Redirects] $sql = "SELECT art.title, art.redirect_url, art.idlang, cat.idart, cat.idcat, catName.name AS namecat FROM " . $cfg['tab']['cat_art'] . " cat\n LEFT JOIN " . $cfg['tab']['art_lang'] . " art ON (art.idart = cat.idart)\n LEFT JOIN " . $cfg['tab']['cat_lang'] . " catName ON (catName.idcat = cat.idcat)\n WHERE cat.idcat IN (0, " . join(", ", $aCats) . ") AND cat.idcat != '0' " . $sLang_where . "\n AND art.online = '1' AND art.redirect = '1'"; $db->query($sql); while ($db->next_record()) { // Search links searchLinks($db->f("redirect_url"), $db->f("idart"), $db->f("title"), $db->f("idcat"), $db->f("namecat"), $db->f("idlang"), "Redirect"); // Search front_content.php-links if ($_GET['mode'] != 2) { searchFrontContentLinks($db->f("redirect_url"), $db->f("idart"), $db->f("title"), $db->f("idcat"), $db->f("namecat")); } } // Check the links checkLinks(); } } /* Analysis of the errors */ // Templateset if ($cronjob != true) { $tpl->set('s', 'TITLE', i18n('Link analysis from ', $plugin_name) . strftime(i18n('%Y-%m-%d', $plugin_name), time())); } // If no errors found, say that if (empty($aErrors) && $cronjob != true) { $tpl->set('s', 'NO_ERRORS', i18n("<strong>No errors</strong> were found.", $plugin_name)); $tpl->generate($cfg['templates']['linkchecker_noerrors']); } elseif (!empty($aErrors) && $cronjob != true) { $tpl->set('s', 'ERRORS_HEADLINE', i18n("Total checked links", $plugin_name)); $tpl->set('s', 'ERRORS_HEADLINE_ARTID', i18n("idart", $plugin_name)); $tpl->set('s', 'ERRORS_HEADLINE_ARTICLE', i18n("Article", $plugin_name));
?> <a class="js_controlpanel_link" href="index.php?option=com_jsjobs&c=purchasehistory&view=purchasehistory&layout=jobseekerpurchasehistory&Itemid=<?php echo $this->Itemid; ?> "> <img class="js_controlpanel_link_image" src="components/com_jsjobs/images/purchase_history.png" alt=" Job seeker Purchase History" /> <div class="js_controlpanel_link_text_wrapper"> <span class="js_controlpanel_link_title"><?php echo JText::_('JS_PURCHASE_HISTORY'); ?> </span> </div> </a> <?php } $print = checkLinks('jsmy_stats', $userrole, $config, $jscontrolpanel); if ($print) { ?> <a class="js_controlpanel_link" href="index.php?option=com_jsjobs&c=jobseeker&view=jobseeker&layout=my_stats&Itemid=<?php echo $this->Itemid; ?> "> <img class="js_controlpanel_link_image" src="components/com_jsjobs/images/mystats.png" alt="My Stats" /> <div class="js_controlpanel_link_text_wrapper"> <span class="js_controlpanel_link_title"><?php echo JText::_('JS_MY_STATS'); ?> </span> </div> </a> <?php