Пример #1
0
<?php

include "includes/app_top.php";
$pcat = "Website";
$pagetitle = "Report Problem";
$getid = getid('id');
checkAdminLogin();
checkState();
include "includes/styles.php";
?>
 
<?php 
include "includes/colorbox.php";
?>
  
</head>
<body>
<?php 
include "includes/header.php";
include "includes/side-bar.php";
?>
 <div class="pageHeadingBlock ">
        	<div class="grayBackground">
        	<h3 class="title">Report Problem</h3>
            <div class="sectionTabNav">
            	<?php 
echo $tab_website;
?>
            </div>
        	</div>
        </div>
Пример #2
0
echo base_url();
echo date("Y");
?>
/<?php 
echo date("m");
?>
/judulposting</p>
</div>
</div>

<div class="row">
<div class="col-md-3">
<div class="radio">
<label>
  <input type="radio" name="common" value="title" <?php 
echo checkState($permalink, 'title');
?>
>Judul
</label>
</div>
</div>
<div class="col-md-9">
	<p class="form-control-static"><?php 
echo base_url();
?>
judulposting</p>
</div>
</div>

<h3 class="heading-a">Optional</h3>
<div class="form-group">
Пример #3
0
    $ban = 0;
    try {
        $conexion = mysql_connect("localhost", "owloo_admin", "fblatamx244") or die(mysql_error());
        mysql_select_db("owloo_owloo", $conexion) or die(mysql_error());
        $num_register = 0;
        $num_country = 0;
        $query = "SELECT count(*) num_register FROM record_country WHERE date = DATE_FORMAT(now(),'%Y-%m-%d') AND total_user is not null AND total_female is not null AND total_male is not null;";
        $que = mysql_query($query, $conexion) or die(mysql_error());
        if ($fila = mysql_fetch_assoc($que)) {
            $num_register = $fila['num_register'];
        }
        $query = "SELECT count(*) num_country FROM country;";
        $que = mysql_query($query, $conexion) or die(mysql_error());
        if ($fila = mysql_fetch_assoc($que)) {
            $num_country = $fila['num_country'];
        }
        mysql_close($conexion);
        if ($num_register == $num_country) {
            $ban = 1;
        }
        return $ban;
    } catch (Exception $e) {
        informar("Se ha detectado un error en la verificación de la captura de ranking de países. Favor verificar estado...");
        exit;
    }
    return $ban;
}
if (!checkState()) {
    eliminaRegistrosHoy();
    informar("Se ha detectado un error en la captura de ranking de países. Favor verificar estado...");
}
Пример #4
0
     goBack('Shipping Address: Last Name');
     return false;
 }
 if (!(isset($_POST['address1']) && checkStreetAddress($_POST['address1'], 20))) {
     goBack('Shipping Address: Address 1');
     return false;
 }
 if (isset($_POST['address2']) && strlen($_POST['address2']) && !checkStreetAddress($_POST['address2'], 20)) {
     goBack('Shipping Address: Address 2');
     return false;
 }
 if (!(isset($_POST['city']) && checkName($_POST['city'], 20))) {
     goBack('Shipping Address: City');
     return false;
 }
 if (!(isset($_POST['state']) && checkState($_POST['state']))) {
     goBack('Shipping Address: State');
     return false;
 }
 if (!(isset($_POST['zip']) && checkZip($_POST['zip']))) {
     goBack('Shipping Address: Zip');
     return false;
 }
 if (isset($_POST['favorite_cheese']) && strlen($_POST['favorite_cheese']) && !checkString($_POST['favorite_cheese'], 20)) {
     goBack('Favorite Cheese');
     return false;
 }
 if (isset($_POST['source']) && strlen($_POST['source']) && !checkString($_POST['source'], 60)) {
     goBack('Where did you hear about us?');
     return false;
 }
Пример #5
0
<div class="box-body" style="overflow: auto;height:200px;">
  <?php 
    $p = '';
    $dParent = getCategory();
    if (!empty($dParent)) {
        foreach ($dParent as $rParent) {
            $c1 = checkState(postTaxonomyExists($row->post_id, 'category', $rParent->term_id), true);
            $p .= '<div class="checkbox">';
            $p .= '<label>';
            $p .= '<input type="checkbox" name="kat[]" value="' . $rParent->term_id . '" ' . $c1 . '/>' . $rParent->name;
            $p .= '</label>';
            $p .= '</div>';
            $dChild = getCategory($rParent->term_id);
            if (!empty($dChild)) {
                foreach ($dChild as $rChild) {
                    $c2 = checkState(postTaxonomyExists($row->post_id, 'category', $rChild->term_id), true);
                    $p .= '<div class="checkbox">';
                    $p .= '<label>';
                    $p .= '<span style="padding-left:10px;"><input type="checkbox" name="kat[]" value="' . $rChild->term_id . '" ' . $c2 . '/>' . $rChild->name . '</style>';
                    $p .= '</label>';
                    $p .= '</div>';
                }
            }
        }
    }
    echo $p;
    ?>
</div>
</div>
<?php 
}
function parseAddress($data)
{
    // it looks like google puts in some funky characters - this code first encodes
    // the special characters, then it replaces them with spaces
    $data = filter_var($data, FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH);
    $data = str_replace(array("&#194;", "&#160;"), array(" ", ""), $data);
    if ($data == "" || $data == "-") {
        errorMsg("No address information given.");
        return array("", "", "", "", "");
    }
    // first, try to pull out the state and zip
    // note that because regex is "greedy", an address with a comma
    // after the street name will still work - the first comman will
    // be swallowed up by the leading ".*" in the pattern below
    // ** Fri Oct 31 09:06:11 2014 ** changed to not do long zip codes (removed dash)
    $stateZipRegex = "/.*,[ ]*([A-Za-z]+) ([0-9]+)/";
    $state = "";
    $zip = "";
    if (preg_match($stateZipRegex, $data, $matches)) {
        // matches should have three because $matches[0] is the whole thing
        // and there should be [1] and [2] as well
        if (count($matches) < 3) {
            errorMsg("Couldn't completely match state/zip");
        } else {
            $state = $matches[1];
            $zip = $matches[2];
            if (!checkState($state)) {
                errorMsg("State doesn't really look valid to me: \"{$state}\"");
            }
        }
    } else {
        errorMsg("Couldn't match state/zip");
    }
    // check the zip code - and use the data later for city validation
    $zipCity = "";
    $verify = zipCodeCheck($zip);
    if (!$verify) {
        errorMsg("Zip code \"{$zip}\" doesn't appear to be valid");
    } else {
        $zipCity = strtolower($verify["PostalCode"]["Details"]["City"]);
    }
    // now try to pull out the street address and city
    // note that we can ONLY pull out one line of street address currently
    $streetCityRegex = "/(.*) ({$zipCity})[ ]*,/i";
    $street = "";
    $city = "";
    if (preg_match($streetCityRegex, $data, $matches)) {
        // matches should have two because $matches[0] is the whole thing
        // and there should be [1] for street [2] for city (as they typed it)
        if (count($matches) < 3) {
            errorMsg("Couldn't completely match street/city.");
        } else {
            $street = $matches[1];
            $city = $matches[2];
        }
    } else {
        errorMsg("Couldn't match street/city from lookup ({$zipCity}).");
        $guessStreetCityRegex = "/(.*) ([a-z]*)[ ]*,/i";
        if (preg_match($guessStreetCityRegex, $data, $matches)) {
            $street = $matches[1];
            $city = $matches[2];
            errorMsg("Guessing that city is \"{$city}\".");
        } else {
            errorMsg("I have no useful guesses.");
        }
    }
    // extract Street2 if there is one
    $street1 = "";
    // both are blank by default
    $street2 = "";
    $streets = explode(";", $street);
    if ($streets) {
        $street1 = trim($streets[0]);
        if (count($streets) > 1) {
            $street2 = trim($streets[1]);
        }
    }
    return array($street1, $street2, $city, $state, $zip);
}