Source

myswap / 1 / code / App / Common / common.php

<?php
function startsWith($haystack, $needle)
{
    $length = strlen($needle);
    return (substr($haystack, 0, $length) === $needle);
}

function endsWith($haystack, $needle)
{
    $length = strlen($needle);
    $start  = $length * -1; //negative
    return (substr($haystack, $start) === $needle);
}

function check_confirm($public)
{
	if($public==1){
		return ("checked='yes'");
	}else{
		return ("");
	}
}

function valid_username($username)
{
	return 1;
}

function valid_email($email)
{
	return 1;
}


?>