Example #1
0
                                                <input type="hidden" name="cus_id" id="cus_id" value="<?php 
echo $_GET['comp_id'];
?>
" />
                                                <input type="hidden" name="comp_id_order" id="comp_id_order" value="<?php 
echo $comp_id;
?>
" />
                                                <input type="hidden" name="comp_name" id="comp_name" value="<?php 
echo getCompName($comp_id);
?>
" />
                                                <div style="float: left;width: 100%;"> 
                                                    <div style="float: left;width: 19%;text-align: left;padding-bottom: 10px;padding-top: 10px;padding-left: 10px;"><input type="button" onclick="return back_to_customer();" name="Back" value="BACK" style="background: #FF7E00;color: #FFF;padding: 5px 10px;border-radius: 6px;font-weight: bold;cursor: pointer;border: 0px;" /></div>
                                                    <div style="float: left;width: 38%;text-align: center;padding-bottom: 10px;padding-top: 10px;"><h2><?php 
echo getCompName($comp_id);
?>
</h2></div>                                                    
                                                    
                                                    <div style="float: left;width: 19%;padding-bottom: 10px;padding-top: 10px;padding-left: 10px;margin-top: 5px;"><a href="print_fav_screen.php?comp_id=<?php 
echo $comp_id;
?>
" target="_blank" style="text-decoration: none;"><span style="background: #FF7E00;color: #FFF;padding: 5px 10px;border-radius: 6px;font-weight: bold;cursor: pointer;border: 0px;">PRINT</span></a></div>
                                                    <div style="float: left;width: 19%;text-align: right;padding-bottom: 10px;padding-top: 10px;"><input type="submit" name="Delete" value="REMOVE" style="background: #FF7E00;color: #FFF;padding: 5px 10px;border-radius: 6px;font-weight: bold;cursor: pointer;border: 0px;" /></div>
                                                </div>
                                                <div style="float: left;width: 100%;"><div id="msg" style="color:#007F2A; font-size: 13px;text-align: center;"></div></div>
                                                <table align="left" width="100%">
                                                    <tr bgcolor="#ff7e00">
                                                        <td height="28" width="80" align="center" valign="middle" class="td_brdr" bgcolor="#f99b3e">S.No</td>
                                                        <td height="28" width="375" align="center" valign="middle" class="td_brdr" bgcolor="#f99b3e">Product Name</td>
                                                        <td height="28" width="85" align="center" valign="middle" class="td_brdr" bgcolor="#f99b3e">LIST PRICE</td>
Example #2
0
//if(!check_db)
$table = $argv[2];
$module = isset($argv[3]) ? $argv[3] : $table;
$metatpl = isset($argv[4]) ? $argv[4] : "metatpl";
define("META_TPL", $metatpl);
include_once dirname(dirname(__FILE__)) . "/app_init.php";
//include_once dirname(__FILE__)."/require_auth.php";
include_once dirname(__FILE__) . "/gen_meta.inc.php";
if (!defined("CLI")) {
    exit;
}
$moduleDir = MODULE_PATH . DIRECTORY_SEPARATOR . str_replace(".", DIRECTORY_SEPARATOR, $module);
// help user to set the metadata namings
$temp = explode("_", $table);
for ($i = 0; $i < count($temp); $i++) {
    $namings[$i] = array($moduleDir, getCompName($table, $i), getCompDisplayName($table, $i), $module);
}
echo "---------------------------------------" . PHP_EOL;
echo "Please select metadata naming:" . PHP_EOL;
for ($i = 0; $i < count($namings); $i++) {
    echo $i + 1 . ". module path: " . str_replace(MODULE_PATH, "", $namings[$i][0]) . ", object name: " . $namings[$i][1] . ", module name: " . $namings[$i][3] . PHP_EOL;
    $ques[] = $i + 1;
}
echo "S. specify a custom module path, object name and module name" . PHP_EOL;
echo "Please select: [" . implode("/", $ques) . "/s] (1) : ";
$n = 0;
while (1) {
    $selection = trim(fgets(STDIN));
    $answer = intval($selection) - 1;
    if (strtolower($selection) == 's') {
        echo "Please set a module path: ";
Example #3
0
     //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch
     $mail->AddAddress($mail_id, $mail_id);
     $mail->SetFrom('*****@*****.**', 'Soho Repro');
     $mail->Subject = 'Soho Repro Order ' . $reference_val;
     $mail->MsgHTML(file_get_contents('./cart_invoice_tmpl/invoice_' . $order_id_final . '.html'));
     $sent_result = $mail->Send();
     if ($sent_result) {
         return '1';
     } else {
         return '0';
     }
 }
 $final_html = $primary_mail_var;
 $final_comp_id = $_POST['final_order_id'];
 $final_usr_id = $_POST['final_usr_id'];
 $company_name = getCompName($_SESSION['sohorepro_companyid']);
 $mail_id = getActiveEmailOrder();
 $my_file = 'cart_invoice_tmpl/invoice_' . $order_id_final . '.html';
 $handle = fopen($my_file, 'w') or die('Cannot open file:  ' . $my_file);
 //implicitly creates file
 $my_file_open = 'cart_invoice_tmpl/invoice_' . $order_id_final . '.html';
 $handle_new = fopen($my_file_open, 'w') or die('Cannot open file:  ' . $my_file);
 fwrite($handle_new, $final_html);
 $user_mail = array('email_id' => UserMail($final_usr_id));
 //$customer_email = CompanyMail($company_id);
 $customer_email = array('email_id' => CompanyMail($final_comp_id));
 array_push($mail_id, $user_mail, $customer_email);
 foreach ($mail_id as $mails_sent) {
     $pre_filt[] = $mails_sent['email_id'];
 }
 $final_list = array_unique($pre_filt);
Example #4
0
    
$sql_order_id = mysql_query("SELECT order_sequence FROM sohorepro_order_master ORDER BY id DESC LIMIT 1");
$object_order = mysql_fetch_assoc($sql_order_id);

        if (count($object_order['order_sequence']) > 0) {
            $order_id = ($object_order['order_sequence'] + 1);
        } 
        else{
            $order_id = '900100101';
        }
    
   
        
$user_id          =       $_POST['user_cart_id'];
$company_id       =       $_POST['company_id'];
$company_name     =       getCompName($company_id);
$referece         =       strtoupper($_POST['reference']);
$deleivery_date   =       $_POST['date'];
$comment_ord      =       mysql_real_escape_string($_POST['comment_ord']);

//Funcionality for Auto Load Reference Start.
    $chk_reference    = CheckReference($company_id,$referece);
    if(count($chk_reference) == 0){
    $ref_sql = "INSERT INTO sohorepro_reference SET company_id = '".$company_id."', user_id = '".$user_id."', reference = '".$referece."' ";
    mysql_query($ref_sql);
    }
//Funcionality for Auto Load Reference End.


$sql = "INSERT INTO sohorepro_order_master SET order_number = '".$order_id."',order_sequence = '".$order_id."', order_id     = '" . $referece . "', customer_company = '".$company_id."', customer_company_name = '".$company_name."' , customer_name = '".$user_id."', deleivery_date = '".$deleivery_date."', order_comment = '".$comment_ord."', created_date = now()";
mysql_query($sql);
Example #5
0
function CreateUsrNotiUser($reg_compname, $cus_contact_name, $reg_email_id, $reg_password)
{
    $comp_name = getCompName($reg_compname);
    $message = '<html>';
    $message .= '<head>';
    $message .= '<title></title>';
    $message .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
    $message .= '</head>';
    $message .= '<body>';
    $message .= '<table width="550" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr bgcolor="#ff7e00">';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '<td height="10" align="left" valign="top"></td>';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>';
    $message .= '<td align="left" valign="top">';
    $message .= '<table width="530" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr>';
    $message .= '<td width="20" height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td width="20" height="20" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td width="20" align="left" valign="top"></td>';
    $message .= '<td align="left" valign="top">';
    $message .= '<table width="490" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr>';
    $message .= '<td width="100" align="left" valign="top"><img src="http://supply.sohorepro.com/store_files/soho_logo.jpg" width="126" height="115" alt=""/></td>';
    $message .= '<td width="40" align="left" valign="top"></td>';
    $message .= '<td width="350" align="left" valign="top">';
    $message .= '<table width="350" border="0" cellspacing="0" cellpadding="0" style="margin-right:-1px;">';
    $message .= '<tr>';
    $message .= '<td height="25" align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#ff7e00; font-weight:bold;">Dear ' . $cus_contact_name . ',</br></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#444444">';
    $message .= '<table>';
    $message .= '<tr>';
    $message .= '<td>Your account has been successfully dreated by ' . $comp_name . ' </td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td><b>User Credentials :</b></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td>User Name : ' . $reg_email_id . '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td>Password : '******'</td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>';
    $message .= '</tr>';
    $message .= '<tr bgcolor="#ff7e00">';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '<td height="10" align="left" valign="top"></td>';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</body>';
    $message .= '</html>';
    $final_html = html_entity_decode($message);
    $subject = 'Account has been created by ' . $comp_name;
    $headers = 'From: "SohoRepro" <*****@*****.**>' . "\r\n";
    $headers .= "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
    //$mail_id = '*****@*****.**';
    if ($comp_name != '') {
        $result_mail = mail($reg_email_id, $subject, $final_html, $headers);
    }
    if ($result_mail) {
        return '1';
    } else {
        return '0';
    }
}
Example #6
0
    exit;
}
$dbname = $argv[1];
$table = $argv[2];
$module = isset($argv[3]) ? $argv[3] : $table;
$metatpl = isset($argv[4]) ? $argv[4] : "metatpl";
define("META_TPL", $metatpl);
include_once "../app.inc";
include_once "gen_meta.inc.php";
if (!defined("CLI")) {
    exit;
}
$moduleDir = MODULE_PATH . DIRECTORY_SEPARATOR . str_replace(".", DIRECTORY_SEPARATOR, $module);
// help user to set the metadata namings
$namings[0] = array($moduleDir, getCompName($table));
$namings[1] = array($moduleDir, getCompName($table, 1));
echo "---------------------------------------" . PHP_EOL;
echo "Please select metadata naming:" . PHP_EOL;
for ($i = 0; $i < count($namings); $i++) {
    echo $i + 1 . ". module path: " . str_replace(MODULE_PATH, "", $namings[$i][0]) . ", object name: " . $namings[$i][1] . PHP_EOL;
    $ques[] = $i + 1;
}
echo "Please select: [" . implode("/", $ques) . "] (1) : ";
$n = 0;
while (1) {
    $answer = intval(trim(fgets(STDIN))) - 1;
    $answer = $answer > -1 ? $answer : 0;
    if (!isset($namings[$answer]) && $n++ < 3) {
        echo "Please select again: [" . implode("/", $ques) . "] : ";
    } else {
        break;
Example #7
0
?>
 |<a href="logout.php" style="text-decoration:none;color:#fff;">&nbsp;Logout</a></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="14" align="left" valign="middle"></td>
                                    </tr> 
                                    <tr>
                                        <td align="right" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td height="38" align="left" valign="middle" class="add_title">Search</td>
                                                </tr>
                                                <tr>
                                                    <td height="60" align="left" valign="top" bgcolor="#f6f6f6" class="form_bg">
                                                        <?php 
$search_values = $_GET['cus_id'] != '' ? getCompName($_GET['cus_id']) : $_REQUEST['search_val'];
?>
                                                        <form name="new_supercategory" id="new_supercategory" method="post" action=""  onsubmit="return load_userinfo()" >
                                                            <input type="hidden" name="search_cus" value="1" />
                                                            <input type="hidden" name="new_cat" value="1" />       
                                                            <table  border="0" cellspacing="0" cellpadding="0" >
                                                                <tr style="float:left;">
                                                                    <td width="160" height="60" align="right" valign="middle">
                                                                        <input class="input_text" type="text" name="search_val" id="search_val" autocomplete="off" onkeyup="return autosuggession();" type="text" value="<?php 
echo $search_values;
?>
" placeholder="Company Name/Email ID" style="width:300px !important; margin-left: 25px;" >
                                                                        <div id="result_ref">
                                                                        </div>
                                                                    </td>
                                                                    <td width="210" height="60" align="center" valign="middle" style="padding-left: 10px;">