if (strcmp($txtPassword, $txtConfirmPassword) != 0) {
                 $message .= "* New passwords does not match! <br>";
             }
         }
     }
 }
 if ($message != "") {
     // error
     $message = "<br>Please correct the following errors to continue!<br>" . $message;
 } else {
     // no error so insert user details
     $sql = "UPDATE " . $tableprefix . "artists SET\n\t\t\tpassword = '******'\n\t\t\tWHERE artist_id =  '" . addslashes($artistid) . "'\n\t\t\t";
     mysql_query($sql);
     $updatedRows = mysql_affected_rows();
     //send mail to admin if this feature is enabled for this seller
     $vendorSettings = getVendorEnabledSettings($artistid, 'enableSendMailChangePassword');
     if ($vendorSettings == 'Y') {
         if ($updatedRows > 0) {
             $to = SITE_EMAIL;
             $sellerName = getSellerFullname($artistid);
             //$link = "<a target= '_blank' href='".SITE_URL."/admin/editartist.php?artistid=".$artistid."&rghtMenu=rghtMenu4&displayDiv=Members'> Click here to view the details</a>";
             $date = date('m/d/Y');
             $subject = "Password of a seller has been changed in - " . stripslashes(SITE_NAME);
             /*---------Email Template Reading Fuction Call----------------------------------------*/
             $mailcontent = readEmailTemplate('seller_change_password');
             $mailcontent = str_replace('[seller_name]', $sellerName, $mailcontent);
             $mailcontent = str_replace('[date_change]', $date, $mailcontent);
             $mailcontent = str_replace('[site_name]', SITE_NAME, $mailcontent);
             $headers = "MIME-Version: 1.0" . "\r\n";
             $headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
             $headers .= "From: " . SITE_NAME . "<" . SITE_EMAIL . ">" . "\r\n";
 $shipping_weight = $txtShippingWeight . " lbs";
 //===========================For showing product images====================================
 /*if($small_image_name_after_upload=="") { // check if thumnail image is not avilabe select images from
                     if(!empty($big_image_name_after_upload)) { // check if big image is uploaded or not
 
                         $product_image=SITE_URL."/products/$big_image_name_after_upload";
                     }else { // if images not in the table
                         $product_image=SITE_URL."/products/noimage.jpg";
 
                     }	 // end if
 
                 }else {
                     $product_image=SITE_URL."/products/$small_image_name_after_upload";
                 }*/
 //send mail to admin if this feature is enabled for this seller
 $vendorSettings = getVendorEnabledSettings($artistid, 'enableSendMailProductAdd');
 if ($vendorSettings == 'Y') {
     $imageurl = '<img src="' . $product_image . '" width="120" height="150" border="0" >';
     //==================================End display product image===============================
     $link = "<a href=" . SITE_URL . "/admin/editproduct.php?productid={$product_insert_id}>Click here to view the product</a>";
     /*---------Multicart Seller Account Acivation Email Confirmation to seller------------*/
     $subject = "A new product has been added in - " . stripslashes(SITE_NAME);
     /*---------Email Template Reading Fuction Call----------------------------------------*/
     $mailcontent = readEmailTemplate('new_product_approval', 'products');
     $mailcontent = str_replace('[seller_username]', $seller_username, $mailcontent);
     $mailcontent = str_replace('[seller_name]', $seller_name, $mailcontent);
     $mailcontent = str_replace('[date]', $date, $mailcontent);
     $mailcontent = str_replace('[product_name]', $product_name, $mailcontent);
     $mailcontent = str_replace('[product_code]', $txtProductCode, $mailcontent);
     $mailcontent = str_replace('[product_price]', $product_price, $mailcontent);
     $mailcontent = str_replace('[product_discount]', $txtDiscount, $mailcontent);
 }
 $qry2 = "select email from  " . $tableprefix . "artists where email='" . addslashes($txtEmail) . "' AND artist_id <> '" . addslashes($artistid) . "' ";
 if (mysql_num_rows(mysql_query($qry2)) > 0) {
     $message .= "* The email address '" . htmlentities($txtEmail) . "' is already in use!. <br>";
 }
 if ($message != "") {
     // error
     $message = "<br>Please correct the following errors to continue!<br>" . $message;
 } else {
     // no error so insert user details
     $vacationmode = $_POST['vacationmode'] == 'on' ? 'Y' : 'N';
     $sql = "UPDATE " . $tableprefix . "artists SET\n\t\t\tfirst_name = '" . addslashes($txtFirstName) . "',\n\t\t\tlast_name = '" . addslashes($txtLastName) . "',\n\t\t\taddress1 = '" . addslashes($txtAddress1) . "',\n\t\t\taddress2 = '" . addslashes($txtAddress2) . "',\n\t\t\tcity = '" . addslashes($txtCity) . "',\n\t\t\tstate = '" . addslashes($txtState) . "',\n\t\t\tcountry = '" . addslashes($ddlCountry) . "',\n\t\t\tphone = '" . addslashes($txtPhone) . "',\n\t\t\tfax = '" . addslashes($txtFAX) . "',\n\t\t\tzip = '" . addslashes($txtZIP) . "',\n\t\t\temail = '" . addslashes($txtEmail) . "',\n\t\t\tcompany='" . addslashes($txtCompany) . "',\n\t\t\twebsite='" . addslashes($txtWeb) . "',\n\t\t\tpaypalemail='" . addslashes($txtPaypalEmail) . "',\n                        vacationmode= '" . addslashes($vacationmode) . "'\n\t\t\tWHERE artist_id =  '" . addslashes($artistid) . "'\n\t\t\t";
     mysql_query($sql) or die(mysql_error());
     $updatedRows = mysql_affected_rows();
     //send mail to admin if this feature is enabled for this seller
     $vendorSettings = getVendorEnabledSettings($artistid, 'enableSendMailProfileEdit');
     if ($vendorSettings == 'Y') {
         if ($updatedRows > 0) {
             $to = SITE_EMAIL;
             $sellerName = getSellerFullname($artistid);
             $link = "<a target= '_blank' href='" . SITE_URL . "/admin/editartist.php?artistid=" . $artistid . "&rghtMenu=rghtMenu4&displayDiv=Members'> Click here to view the details</a>";
             $date = date('m/d/Y');
             /*---------Multicart Seller Account Acivation Email Confirmation to seller------------*/
             $subject = "Profile of a vendor has been edited in - " . stripslashes(SITE_NAME);
             /*---------Email Template Reading Fuction Call----------------------------------------*/
             $mailcontent = readEmailTemplate('seller_profile_edit');
             $mailcontent = str_replace('[seller_name]', $sellerName, $mailcontent);
             $mailcontent = str_replace('[date_change]', $date, $mailcontent);
             $mailcontent = str_replace('[seller_link]', $link, $mailcontent);
             $mailcontent = str_replace('[site_name]', SITE_NAME, $mailcontent);
             $headers = "MIME-Version: 1.0" . "\r\n";