Location: PHPKode > projects > NOLA > adminarcarrierupd.php
<? include('includes/main.php'); ?>
<? include('includes/arfunctions.php'); ?>
<script language="JavaScript" src="js/validatephone.js">
</script>
<?
     echo texttitle(STR_CARRIER_UPDATE);
     if ($companyid||$carrierid) { //if carrier selected
          if ($delete) { //if carrier should be deleted
               $conn->BeginTrans();
               if (arcompanydelete($companyid)&&arcarrierdelete($carrierid)) {
                    $conn->CommitTrans();
                    die(); //OK
               };
               $conn->RollbackTrans();
          } elseif ($name) {  //if carrier should be updated
               $conn->BeginTrans();
               if (arcompanyupdate($companyid, $address1, $address2, $city, $state, $zip, $country, $phone1, $phone1comment, $phone2, $phone2comment, $phone3, $phone3comment, $phone4, $phone4comment, $email1, $email1comment, $email2, $email2comment, $website, $federalid, $name,$mailstop,$lastchangedate)&&arcarrierupdate($carrierid, $customernumber, $trackingurlbase, $trackingurlvarname)) {
                    $conn->CommitTrans();
               } else {
                    $conn->RollbackTrans();
               };
          };
          //edit carrier
          echo '<form action="adminarcarrierupd.php" method="post"><table>';
          formarcarrierupdate($carrierid);
          echo '</table><input type="submit" value="'.STR_SAVE_CHANGES.'"></form>';
          echo '<br><a href="adminarcarriermethupd.php?carrierid='.$carrierid.'">'.STR_UPDATE_CARRIER_METHOD.'</a>';

          echo '<br><br><a href="javascript:confirmdelete(\'adminarcarrierupd.php?delete=1&companyid='.$companyid.'&carrierid='.$carrierid.'\')">'.STR_DELETE_THIS_CARRIER.'</a>';
     } else { //select carrier
          echo '<form action="adminarcarrierupd.php" method="post"><table>';
          if (formarcarrierselect('carrierid')) echo '<input type="submit" value="'.STR_EDIT.'">';
          echo '</table></form><a href="adminarcarrieradd.php">'.STR_ADD_NEW_CARRIER.'</a>';
     };
?>
<? include('includes/footer.php'); ?>
Return current item: NOLA