Em Andamento

PopupWindows

I get a php file that I want to convert to a .Net Web service (aspx or .asmx). The php file has been converting to C#. Once that job is done we may ask you to have some new features and offer you other jobs.

To view a working example of the project:

[url removed, login to view]

The project it's an in-text advertising system. The php file connects to a database and retrieves the keyworks that are underline by a JavaScript. The attach file get a working version of the project.

1) Convert the [url removed, login to view] file to a C# web service (asmx)

2) Use the MS SQL Server Script to create your test database and test your work before delivery.

3) make sure that the conversion is working with the current JavaScript file and the AJAX Functions. If you don't get Windows web server with a MS SQL Server 2000 or 2005 we can provide you one to setup a test.

My Bubget is MAX $150.00. Thank you in advance.

The file I want to convert:

---------------------------------------------------

<?PHP

class Thesaurus {

var $DataSourceFile;

var $Output;

var $BodyContent;

var $Term;

var $ErrorMsg;

var $Length;

var $TermList;

/**

* Class Constructor

* @return object

*/

function Thesaurus() {

$db_info = array(

"host" => "localhost",

"user" => "massmail_massmai",

"password" => "mass@230",

"dbname" => "massmail_Thesaurus",

);

$this->DataSourceFile = "sample.csv";

$this->BodyContent = false;

$this->ErrorMsg = false;

$this->Term = false;

$this->TermList = "";

$this->Length = 0;

$this->Output = '';

mysql_connect($db_info["host"], $db_info["user"], $db_info["password"])

or $this->ErrorMsg = "Could not connect: " . mysql_error();

mysql_select_db($db_info["dbname"])

or $this->ErrorMsg = 'Can't use '.$db_info["dbname"].' : ' . mysql_error();

if(isset($_POST["term"])) {

$this->Term = urldecode($_POST["term"]);

$this->Term = $this->str2lower($this->Term);

$this->Term = trim($this->Term);

}

return $this;

}

/**

* Convert UTF-8 string

*

* @return boolean

*/

function str2lower($str) {

if($_POST["casesensitive"]=="on") return $str;

if(function_exists("mb_strtolower") )

return mb_strtolower($str);

else

return strtolower($str);

}

/**

* Calc Click

*

* @return boolean

*/

function calcClick() {

if($_POST["casesensitive"]=="on") {

mysql_query("UPDATE thesaurus SET clicked=clicked+1 WHERE term='{$this->Term}'");

} else {

mysql_query("UPDATE thesaurus SET clicked=clicked+1 WHERE LCASE(term)='{$this->Term}'");

}

}

/**

* Get data and filter data

*

* @return boolean

*/

function getDataAndFitlering() {

if($_POST["casesensitive"]=="on") {

mysql_query("UPDATE thesaurus SET visited=visited+1 WHERE term='{$this->Term}'");

$result = mysql_query("SELECT term, description FROM thesaurus WHERE term='{$this->Term}'");

} else {

mysql_query("UPDATE thesaurus SET visited=visited+1 WHERE LCASE(term)='{$this->Term}'");

$result = mysql_query("SELECT term, description FROM thesaurus WHERE LCASE(term)='{$this->Term}'");

}

$fetch = mysql_fetch_array($result, MYSQL_ASSOC);

$this->Length = mysql_num_rows($result);

$this->Output = $fetch["description"];

}

/**

* Get data and parse body content

*

* @return boolean

*/

function getDataAndParsing() {

$result = mysql_query("SELECT term FROM thesaurus");

$this->Length = mysql_num_rows($result);

while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {

$this->TermList .= "'{$row["term"]}',";

}

$this->TermList = preg_replace("/,$/", "", $this->TermList);

}

/**

* Respond with JSON generation

*

* @return boolean

*/

function execRespond() {

if(isset($_POST["charset"]) AND $_POST["charset"])

header("Content-type: text/html; charset={$_POST["charset"]}");

else

header("Content-type: text/html; charset=UTF-8");

switch ($_POST["call"]) {

case "getDataAndParsing":

$this->getDataAndParsing();

break;

case "getDataAndFitlering":

$this->getDataAndFitlering();

break;

case "calcClick":

$this->calcClick();

break;

}

if($this->Length==0) return false;

$out = '{

"thlength" : '.$this->Length.',

"termlist" : ['.$this->TermList.'],

"errormsg" : "'.$this->ErrorMsg.'",

"content" : "'.addslashes($this->Output).'",

"term" : "'.(isset($_POST["term"])?urldecode($_POST["term"]):'').'"

}';

print $out;

}

}

$th = new Thesaurus();

$th->execRespond();

?>

Habilidades: .NET, Marketing na Internet, Javascript, PHP, Design de Sites

Ver mais: test jobs, sql data conversion, project calc, max delivery, javascript advertising, html conversion jobs, get length string, data str, data conversion sql, current jobs, connect html javascript, str2lower, javascript str2lower, sql server max, max sql server, jobs test, javascript max, javascript call web service, call service jobs, trim, thesaurus, str, sample json data, new service web host, sql server setup

Acerca do Empregador:
( 11 comentários ) Montreal, Canada

ID do Projeto: #158883

Premiar a:

concepts2k6

PLz see OMB

$150 USD em 2 dias
(15 Avaliações)
5.1

9 freelancers estão ofertando em média $150 para este trabalho

meetesh

plz check my PMB

$200 USD in 7 dias
(81 Comentários)
8.1
sol4life

Please check my PMB

$150 USD in 2 dias
(26 Comentários)
6.0
ubica

can do it perfect. I am expiriencd in php and .net development programmer. Regards, alex.

$250 USD in 3 dias
(5 Comentários)
4.6
vshree

sir Please check your PMB, More about our information visit our profile. Regards Sandesh M M

$150 USD in 3 dias
(18 Comentários)
4.6
detaildevil

Hello, We should be able to get this finished in under 48 hours. Is there any particular reason that you prefer to run it as a service? We are currently running MS SQL 2005. Thank-you for considering us! Chad McG Mais

$150 USD in 2 dias
(0 Comentários)
0.0
NetFL

Please check pm

$100 USD in 2 dias
(0 Comentários)
0.0
AkmalSyed

I have a team of experts.I can start work right now.

$100 USD in 15 dias
(0 Comentários)
0.0
satspy

Plz check PMB.

$100 USD in 2 dias
(0 Comentários)
0.0