<commit_before>(in-package :hhub)
(clsql:file-enable-sql-reader-syntax)



(defun hhub-json-body ()
  (json:decode-json-from-string
    (hunchentoot:raw-post-data :force-text t)))

(defun attr (object field)
  (cdr (assoc field object)))


(defun with-html-checkbox (stream name checked &optional value)
    (with-html-output (stream)
      (:input :type "checkbox" :name name :checked checked :value value)))



(defun dod-controller-new-company-registration-email-sent ()
(with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "New Store details have been sent. You will be contacted soon. ")
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))



(defun dod-controller-password-reset-mail-link-sent ()
(with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "Password Reset Link Sent To Your Email.")
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))


(defun dod-controller-password-reset-mail-sent ()
(with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "Password Reset Email Sent.")
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))
  

(defun dod-controller-invalid-email-error ()
  (with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "Invalid Customer Email.")
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))
		  


(defun dod-controller-password-reset-token-expired ()
  (with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "Your password reset time window has expired. Please try again." )
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))
		  



(defun hhubsendmail (to subject body &optional attachments-list)
(let ((username *HHUBSMTPUSERNAME*) 
      (password  *<PASSWORD>*))  

 (cl-smtp:send-email *HHUBSMTPSERVER*
  *HHUBSMTPSENDER* to 
  subject "Ok, the HTML version of this email is totally impressive. Just trust me on this." 
  :authentication (list :login username password) 
  :ssl
  :tls
  :html-message body
  :display-name subject
  :attachments attachments-list)))



(defun hhubsendmail-test (to subject body &optional attachments-list)
(let ((username *HHUBSMTPUSERNAME*) 
      (password  *<PASSWORD>*)) 
  (cl-smtp:send-email *HHUBSMTPSERVER*
		      *HHUBSMTPTESTSENDER* to 
		      subject "Ok, the HTML version of this email is totally impressive. Just trust me on this." 
		      :authentication (list :login username password) 
		      :ssl
		      :tls
		      :html-message body
		      :display-name subject
		      :attachments attachments-list)))




(defmacro with-html-email ( &body body)
 `(cl-who:with-html-output-to-string (*standard-output* nil :prologue t :indent t)
    (:html 
     (:body
       (:img :class "profile-img" :src "https://highrisehub.com/img/logo.png" :alt "Welcome to Highrisehub.com")
       (:p
	,@body)))))


(defmacro with-standard-page-template ((&key title nav-func)  &body body)
 `(cl-who:with-html-output-to-string (*standard-output* nil :prologue t :indent t)
	 (:html  :xmlns "http://www.w3.org/1999/xhtml"
	     :xml\:lang "en" 
	     :lang "en"
	     (:head 
		 (:meta :http-equiv "content-type" 
		     :content    "text/html;charset=utf-8")
		 (:meta :name "viewport" :content "width=device-width,user-scalable=no")
		 (:meta :name "theme-color" :content "#5382EE")
		 (:meta :names "description" :content "A community marketplace app.")
		 (:meta :name "author" :content "HighriseHub")
		 (:link :rel "icon" :href "/favicon.ico")
		 (:title ,title )
		 ; Link to the app manifest for PWA. 
		 (:link :rel "manifest" :href "/manifest.json")
		 (:link :href "/css/style.css" :rel "stylesheet")
		 (:link :href "/css/bootstrap.min.css" :rel "stylesheet")
		 (:link :href "/css/bootstrap-theme.min.css" :rel "stylesheet")
		 (:link :href "https://code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css" :rel "stylesheet")
		 (:link :href "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" :rel "stylesheet")
		 (:link :href "https://fonts.googleapis.com/css?family=Merriweather:400,900,900i" :rel "stylesheet")
		 (:link :href "/css/theme.css" :rel "stylesheet")
		 ;; js files
		 (:script :src "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js")
		 (:script :src "https://code.jquery.com/ui/1.12.0/jquery-ui.min.js")
		 (:script :src "/js/spin.min.js")
		 (:script :src "https://www.google.com/recaptcha/api.js")
		 (:script :src "https://cdnjs.com/libraries/1000hz-bootstrap-validator")
		 ) ;; header completes here.
	     (:body
		 (:div :id "dod-main-container"
		     (:a :id "scrollup" "" ) 
		 (:div :id "dod-error" (:h2 "error..."))
		 (:div :id "busy-indicator")
		 (:script :src "/js/hhubbusy.js")
		 (if hunchentoot:*session* (,nav-func)) 
		 ;(if (is-dod-cust-session-valid?) (with-customer-navigation-bar))
		 (:div :class "container theme-showcase" :role "main" 
		   (:div :id "header"  ,@body))
		       		 ;; rangeslider
		 ;; bootstrap core javascript
		 (:script :src "/js/bootstrap.min.js")
		  (:script :src "/js/dod.js"))))))

(defmacro with-standard-customer-page (&body body)
`(with-standard-page-template (:title "Welcome Customer" :nav-func with-customer-navigation-bar )  ,@body))

(defmacro with-standard-vendor-page (&body body)
  `(with-standard-page-template (:title "Welcome Vendor" :nav-func with-vendor-navigation-bar )  ,@body))

(defmacro with-standard-admin-page (&body body)
  `(with-standard-page-template (:title "Welcome System Administrator" :nav-func with-admin-navigation-bar )  ,@body))

(defmacro with-standard-compadmin-page (&body body)
  `(with-standard-page-template (:title "Welcome Company Administrator" :nav-func with-compadmin-navigation-bar )  ,@body))
<commit_msg>Changed the URL for the validator.js file<commit_after>(in-package :hhub)
(clsql:file-enable-sql-reader-syntax)



(defun hhub-json-body ()
  (json:decode-json-from-string
    (hunchentoot:raw-post-data :force-text t)))

(defun attr (object field)
  (cdr (assoc field object)))


(defun with-html-checkbox (stream name checked &optional value)
    (with-html-output (stream)
      (:input :type "checkbox" :name name :checked checked :value value)))



(defun dod-controller-new-company-registration-email-sent ()
(with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "New Store details have been sent. You will be contacted soon. ")
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))



(defun dod-controller-password-reset-mail-link-sent ()
(with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "Password Reset Link Sent To Your Email.")
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))


(defun dod-controller-password-reset-mail-sent ()
(with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "Password Reset Email Sent.")
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))
  

(defun dod-controller-invalid-email-error ()
  (with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "Invalid Customer Email.")
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))
		  


(defun dod-controller-password-reset-token-expired ()
  (with-standard-customer-page 
    (:div :class "row" 
	  (:div :class "col-xs-12 col-sm-12 col-md-12 col-lg-12"
		(with-html-form "form-customerchangepin" "hhubcustpassreset"  
					;(:div :class "account-wall"
		  (:h1 :class "text-center login-title"  "Your password reset time window has expired. Please try again." )
		  (:a :class "btn btn-primary"  :role "button" :href "https://www.highrisehub.com"  (:span :class "glyphicon glyphicon-home")))))))
		  



(defun hhubsendmail (to subject body &optional attachments-list)
(let ((username *HHUBSMTPUSERNAME*) 
      (password  *<PASSWORD>*))  

 (cl-smtp:send-email *HHUBSMTPSERVER*
  *HHUBSMTPSENDER* to 
  subject "Ok, the HTML version of this email is totally impressive. Just trust me on this." 
  :authentication (list :login username password) 
  :ssl
  :tls
  :html-message body
  :display-name subject
  :attachments attachments-list)))



(defun hhubsendmail-test (to subject body &optional attachments-list)
(let ((username *HHUBSMTPUSERNAME*) 
      (password  *<PASSWORD>*)) 
  (cl-smtp:send-email *HHUBSMTPSERVER*
		      *HHUBSMTPTESTSENDER* to 
		      subject "Ok, the HTML version of this email is totally impressive. Just trust me on this." 
		      :authentication (list :login username password) 
		      :ssl
		      :tls
		      :html-message body
		      :display-name subject
		      :attachments attachments-list)))




(defmacro with-html-email ( &body body)
 `(cl-who:with-html-output-to-string (*standard-output* nil :prologue t :indent t)
    (:html 
     (:body
       (:img :class "profile-img" :src "https://highrisehub.com/img/logo.png" :alt "Welcome to Highrisehub.com")
       (:p
	,@body)))))


(defmacro with-standard-page-template ((&key title nav-func)  &body body)
 `(cl-who:with-html-output-to-string (*standard-output* nil :prologue t :indent t)
	 (:html  :xmlns "http://www.w3.org/1999/xhtml"
	     :xml\:lang "en" 
	     :lang "en"
	     (:head 
		 (:meta :http-equiv "content-type" 
		     :content    "text/html;charset=utf-8")
		 (:meta :name "viewport" :content "width=device-width,user-scalable=no")
		 (:meta :name "theme-color" :content "#5382EE")
		 (:meta :names "description" :content "A community marketplace app.")
		 (:meta :name "author" :content "HighriseHub")
		 (:link :rel "icon" :href "/favicon.ico")
		 (:title ,title )
		 ; Link to the app manifest for PWA. 
		 (:link :rel "manifest" :href "/manifest.json")
		 (:link :href "/css/style.css" :rel "stylesheet")
		 (:link :href "/css/bootstrap.min.css" :rel "stylesheet")
		 (:link :href "/css/bootstrap-theme.min.css" :rel "stylesheet")
		 (:link :href "https://code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css" :rel "stylesheet")
		 (:link :href "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" :rel "stylesheet")
		 (:link :href "https://fonts.googleapis.com/css?family=Merriweather:400,900,900i" :rel "stylesheet")
		 (:link :href "/css/theme.css" :rel "stylesheet")
		 ;; js files
		 (:script :src "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js")
		 (:script :src "https://code.jquery.com/ui/1.12.0/jquery-ui.min.js")
		 (:script :src "/js/spin.min.js")
		 (:script :src "https://www.google.com/recaptcha/api.js")
		 (:script :src "https://cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.8/validator.min.js")
		 ) ;; header completes here.
	     (:body
		 (:div :id "dod-main-container"
		     (:a :id "scrollup" "" ) 
		 (:div :id "dod-error" (:h2 "error..."))
		 (:div :id "busy-indicator")
		 (:script :src "/js/hhubbusy.js")
		 (if hunchentoot:*session* (,nav-func)) 
		 ;(if (is-dod-cust-session-valid?) (with-customer-navigation-bar))
		 (:div :class "container theme-showcase" :role "main" 
		   (:div :id "header"  ,@body))
		       		 ;; rangeslider
		 ;; bootstrap core javascript
		 (:script :src "/js/bootstrap.min.js")
		  (:script :src "/js/dod.js"))))))

(defmacro with-standard-customer-page (&body body)
`(with-standard-page-template (:title "Welcome Customer" :nav-func with-customer-navigation-bar )  ,@body))

(defmacro with-standard-vendor-page (&body body)
  `(with-standard-page-template (:title "Welcome Vendor" :nav-func with-vendor-navigation-bar )  ,@body))

(defmacro with-standard-admin-page (&body body)
  `(with-standard-page-template (:title "Welcome System Administrator" :nav-func with-admin-navigation-bar )  ,@body))

(defmacro with-standard-compadmin-page (&body body)
  `(with-standard-page-template (:title "Welcome Company Administrator" :nav-func with-compadmin-navigation-bar )  ,@body))

{'fraction_non_alphanumeric': 0.17249267281435413, 'fraction_numerical': 0.012152405461433985, 'mean_word_length': 3.626322751322751, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 26, 'lorem ipsum': 0, 'www.': 14, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4185826', 'n_tokens_mistral': 5447, 'n_tokens_neox': 4760, 'n_words': 1142}