0byt3m1n1
Path:
/
data
/
applications
/
aps.bak
/
vtiger
/
5.0.4
/
custom
/
12100000
/
files
/
lead_form
/
[
Home
]
File: send_data.php
<?php /********************************************************************************* ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. * ********************************************************************************/ include("config.php"); require_once('nusoap/lib/nusoap.php'); $client = new soapclient2($Server_Path."/vtigerservice.php?service=webforms", false, $proxyhost, $proxyport, $proxyusername, $proxypassword); $err = $client->getError(); if($_REQUEST['create'] == 'lead') { if(get_magic_quotes_gpc()) { $lastname = stripslashes($_POST['lastname']); $firstname = stripslashes($_POST['firstname']); $email = $_POST['email']; $phone =stripslashes($_POST['phone']); $company = stripslashes($_POST['company']); $country = stripslashes($_POST['country']); $description = "WebForm : ".stripslashes($_POST['description']); } else { $lastname = $_POST['lastname']; $firstname = $_POST['firsttname']; //$email = $_POST['email']; $email = ""; $phone = $_POST['phone']; $company = $_POST['company']; $country = $_POST['country']; $description = "WebForm : ".$_POST['description']; } $params = array( 'lastname' => "$lastname", 'firstname' => "$firstname", 'email'=>"$email", 'phone'=>"$phone", 'company'=>"$company", 'country'=>"$country", 'description'=>"$description", 'assigned_user_id'=>"$assigned_user_id" ); if($lastname != '') { $result = $client->call('create_lead_from_webform', $params, $Server_Path, $Server_Path); if($result['faultstring'] != '' && is_array($result)) { echo '<br>'.$result['faultstring']; } else { echo '<br><br>'.$result.'<br><br>'; } } else { // sbb: Changing "Lead" to "Contact" $error_message = "<h3>Last Name must be entered to create a Contact.</h3>"; include("index.php"); } } else { include("index.php"); } ?>