diff --git a/admin/assets/css/um-admin-builder.css b/admin/assets/css/um-admin-builder.css new file mode 100644 index 00000000..2a406ba9 --- /dev/null +++ b/admin/assets/css/um-admin-builder.css @@ -0,0 +1,295 @@ +/* + - General +*/ + +.um-admin-builder * { + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale; +} + +.um-admin-builder i { + font-size: 15px !important; + height: 100% !important;line-height: 100% !important;vertical-align: middle !important; + margin: 0 5px 0 0 !important; +} + +.um-admin-builder .um-admin-drag {margin-top: 40px} + +/* + - Add field +*/ +.um-admin-drag-add-field { + display: block; + width: 100%; + height: 30px; + line-height: 30px; + text-align: center; + color: #aaa; + text-decoration: none; +} + +.um-admin-drag-add-field:hover {color: #3ba1da} + +.um-admin-drag-add-field i { + font-size: 23px !important; + margin: 0 !important; +} + +/* + - Drag controls +*/ + +.um-admin-drag-ctrls-demo.um-admin-drag-ctrls { + position: absolute; + right: 7px; + top: -30px; + left: auto; +} + +.um-admin-drag-ctrls { + position: absolute; + top: -30px; + left: 0; +} + +.um-admin-drag-ctrls a { + float: left; + margin: 0 5px 0 0; + height: 30px; + line-height: 30px; + background: #eee; + color: #888; + padding: 0 8px; + text-decoration: none; + border-radius: 2px 2px 0 0; +} + +.um-admin-drag-ctrls a:hover {background-color: #e5e5e5} + +.um-admin-drag-ctrls a.active, +.um-admin-drag-ctrls a.active:hover { + background-color: #3ba1da; + color: #fff; +} + +.um-admin-drag-ctrls.columns a {width: 30px !important;background-image: url(../img/1-column.gif); background-repeat: no-repeat; background-position: center;} +.um-admin-drag-ctrls.columns a:nth-child(2) {background-image: url(../img/2-columns.gif);} +.um-admin-drag-ctrls.columns a:last-child {background-image: url(../img/3-columns.gif);} + +.um-admin-drag-ctrls.columns a.active {background-image: url(../img/1-column-active.gif)} +.um-admin-drag-ctrls.columns a.active:nth-child(2) {background-image: url(../img/2-columns-active.gif);} +.um-admin-drag-ctrls.columns a.active:last-child {background-image: url(../img/3-columns-active.gif);} + +/* + - Drag Area +*/ + +.um-admin-drag { + width: 100%; + background: #f1f1f1; + box-sizing: border-box; + position: relative; + padding: 60px 20px 20px 20px; +} + +.um-admin-drag-row { + width: 100%; + background: #fefefe; + box-sizing: border-box; + position: relative; + padding: 60px 20px 20px 20px; + margin: 0 0 60px 0; +} +.um-admin-drag-row:last-child {margin-bottom: 0} + +.um-admin-drag-row-icons { + position: absolute; + right: 0; + top: -30px; + height: 30px; +} + +.um-admin-drag-rowsub { + position: relative; + box-sizing: border-box; + background: #f1f1f1; + padding: 20px; + margin: 0 0 60px 0; +} +.um-admin-drag-rowsub:last-child {margin-bottom: 0} + +.um-admin-drag-rowsub-icons { + position: absolute; + right: 0; + top: -30px; + height: 30px; +} + +.um-admin-drag-col { + float: left; + width: 100%; + background: #fff; + border: 1px dashed #bbb; + box-sizing: border-box; + padding: 20px; +} + +.um-admin-drag-col.cols-3 {width: 32%;} +.um-admin-drag-col.cols-3.cols-last {width: 32%;} +.um-admin-drag-col.cols-3.cols-middle {width: 32%;margin: 0 2%;} + +.um-admin-drag-col.cols-1 {width: 100%;} +.um-admin-drag-col.cols-1.cols-last {width: 100%;} +.um-admin-drag-col.cols-1.cols-middle {} + +.um-admin-drag-col.cols-2 {width: 49%;margin: 0 1% 0 0} +.um-admin-drag-col.cols-2.cols-last {width: 49%;margin: 0 0 0 1%;} +.um-admin-drag-col.cols-2.cols-middle {} + +.um-admin-drag-addrow { + text-align: center; + font-size: 14px; + color: #888; + cursor: pointer; + border: 1px dashed #bbb; + padding: 10px 0; + margin: 20px 0 0 0; +} +.um-admin-drag-addrow i { + font-size: 23px !important; + margin: 0 !important; +} +.um-admin-drag-addrow:hover {color: #3ba1da} + +/* + - Fields +*/ + +.um-admin-drag-fld { + display: block; + position: relative; + border: 1px solid #dddddd; + margin: 0 0 15px 0; + background: #F5F5F5; + cursor: move !important; +} + +.um-admin-drag-fld.um-field-type-group {background: #555;border: 0} +.um-admin-drag-fld-title.um-field-type-group,.um-admin-drag-fld-type.um-field-type-group {color: #fff} +.um-admin-drag-group {background: #FCFCFC;cursor: default;padding: 20px;border: 1px dashed #bbb;} +.um-admin-drag-col.cols-3 .um-admin-drag-fld-icons.um-field-type-group{float: left;position: relative;bottom: auto;right: auto;height: 30px;display: block;} +.um-admin-drag-fld-icons.um-field-type-group a.um_admin_duplicate_field {display: none !important} + +.um-admin-drag-fld-title, +.um-admin-drag-fld-type { + float: left; + font-weight: bold; + font-size: 13px; + color: #666; + height: 30px; + line-height: 30px; + margin: 0 0 0 20px; +} + +.um-admin-drag-fld-type { + font-weight: 400; + color: #999; +} + +.um-admin-drag-fld-icons { + float: right; +} + +/* + - Responsive cols appearance +*/ + +.um-admin-drag-col.cols-3 .um-admin-drag-fld-title, +.um-admin-drag-col.cols-3 .um-admin-drag-fld-type { + height: auto; + line-height: 18px; + margin: 10px; + margin-bottom: 0; +} + +.um-admin-drag-col.cols-3 .um-admin-drag-fld-type { + margin: 10px; +} + +.um-admin-drag-col.cols-3 .um-admin-drag-fld-icons { + float: none; + position: absolute; + bottom: 0; + right: 0; + height: 30px; + display: none; +} + +.um-admin-drag-col.cols-3 .um-admin-drag-fld:hover .um-admin-drag-fld-icons{display: block;} + +/* + - Icons +*/ + +.um-admin-drag-row-icons a, +.um-admin-drag-row-icons span, +.um-admin-drag-rowsub-icons a, +.um-admin-drag-rowsub-icons span, +.um-admin-drag-fld-icons a{ + text-decoration: none; + color: #fff; + width: 40px; + height: 30px; + line-height: 30px; + text-align: center; + display: block !important; + float: left; + background: #44b0ec; + padding: 0 4px; + transition: all .2s linear; + border-left: 1px solid #379dd5; +} + +.um-admin-drag-row-icons span, +.um-admin-drag-rowsub-icons span +{cursor: move!important} + +.um-admin-drag-row-icons a:hover, +.um-admin-drag-row-icons span:hover, +.um-admin-drag-rowsub-icons a:hover, +.um-admin-drag-rowsub-icons span:hover, +.um-admin-drag-fld-icons a:hover {background: #3396cd;} + +.um-admin-drag-row-icons i, +.um-admin-drag-rowsub-icons i, +.um-admin-drag-fld-icons i{ + font-size: 16px !important; + margin: 0 !important; + top: 1px; + position: relative; +} + +/* + - UI Placeholders +*/ + +.um-row-placeholder { + width: 100%; + border: 2px dashed #aaa; + box-sizing: border-box; +} + +.um-rowsub-placeholder { + width: 100%; + border: 2px dashed #ccc; + box-sizing: border-box; + display: block; +} + +.um-fld-placeholder { + display: block; + border: 1px dashed #dddddd; + background: #fff; + box-sizing: border-box; + width: 100%; +} \ No newline at end of file diff --git a/admin/assets/css/um-admin-columns.css b/admin/assets/css/um-admin-columns.css new file mode 100644 index 00000000..6f0f02d7 --- /dev/null +++ b/admin/assets/css/um-admin-columns.css @@ -0,0 +1,64 @@ +.um-admin td, .um-admin th { + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale; +} + +.um-admin.post-type-um_form .manage-column.column-id {width: 40px} +.um-admin.post-type-um_form .manage-column.column-mode {width: 100px} +.um-admin.post-type-um_form .manage-column.column-title {width: 200px} +.um-admin.post-type-um_form .manage-column.column-shortcode {width: 200px} +.um-admin.post-type-um_form .manage-column.column-impressions {width: 100px} +.um-admin.post-type-um_form .manage-column.column-conversions {width: 100px} + +.um-admin.post-type-um_directory .manage-column.column-id {width: 60px} +.um-admin.post-type-um_directory .manage-column.column-title {width: 250px} + +.um-admin.post-type-um_role .manage-column.column-title {width: 200px} +.um-admin.post-type-um_role .manage-column.column-count {width: 150px} +.um-admin.post-type-um_role .manage-column.column-core {width: 150px} + +.um-admin.users-php .manage-column.column-username {width: 220px} +.um-admin.users-php .manage-column.column-role {width: 150px} +.um-admin.users-php .manage-column.column-name {width: 180px} +.um-admin.users-php .manage-column.column-um_role {width: 150px} +.um-admin.users-php .manage-column.column-um_status {width: 200px} +.um-admin.users-php .manage-column.column-um_info {width: 80px} + +.um-admin.users-php .tablenav.top .bulkactions, + .um-admin.users-php .tablenav.bottom .bulkactions{display:none} + +.um-admin.post-type-um_form td.column-shortcode, +.um-admin.post-type-um_form td.column-id, +.um-admin.post-type-um_directory td.column-shortcode, +.um-admin.post-type-um_directory td.column-id, +.um-admin.post-type-um_role td.column-count +{color: #aaa;font-size: 14px;} + +.um-admin.users-php td.column-um_actions {padding-top: 12px} + +.um-admin.users-php td.column-um_actions a.button { + height: 29px !important; + margin: 0 0 0 2px !important; + position: relative; +} + +.um-admin-tag { + display: inline-block; + border-radius: 2px; + width: 100%; + box-sizing: border-box; + text-align: center; + background: #3ba1da; + color: #fff; + font-size: 14px; + height: 34px; + line-height: 34px; +} +.um-admin-tag.small {font-size: 13px;height:28px;line-height: 28px;display:inline;padding: 4px 10px;background: transparent;color: #666;border-radius:0;} +.um-admin-tag.ok {border-left: 2px solid #93ba37} +.um-admin-tag.pending {border-left: 2px solid #b76767} + +.um-admin-txtspace {margin: 0 0 0 10px;} + +.um-adm-ico {font-size: 20px;margin-top: 5px;display:inline-block;color:#3ba1da} +.um-adm-ico.pointer {cursor: pointer} \ No newline at end of file diff --git a/admin/assets/css/um-admin-dashboard.css b/admin/assets/css/um-admin-dashboard.css new file mode 100644 index 00000000..1f0e84d2 --- /dev/null +++ b/admin/assets/css/um-admin-dashboard.css @@ -0,0 +1,156 @@ +/* + - General +*/ + +.um-admin-dash-container { + box-sizing: border-box; + border-radius: 3px; + margin: 18px 20px 20px 2px !important; + background-color: #F5F5F5; + background-repeat: repeat-x; + background-image: -moz-linear-gradient(center top , #F2F2F2 0px, #F5F5F5 100%); + border: 1px solid #DEDEDE; + box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.04); + overflow: hidden; +} + +.um-admin-dash-container *{ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.um-admin-dash-head { + background: #3ba1da; + border-radius: 3px 3px 0 0; + padding: 0 0 0 20px; + border-bottom: 3px solid #3ba1da; +} + +.um-admin-dash-nav { + float: left; + width: 202px; +} + +.um-admin-dash-nav, +.um-admin-dash-main + { + min-height: 300px; +} + +.um-admin-dash-main { + background: none repeat scroll 0% 0% #FCFCFC; + margin-left: 201px; + border-left: 1px solid #D8D8D8; + padding: 10px 20px; + box-shadow: 0px 1px 0px #FFF inset; +} + +.um-admin-dash-foot { + background: none repeat scroll 0% 0% #EEE; + height: 60px; + border-radius: 0 0 3px 3px; + border-top: 1px solid #E7E7E7; + z-index: 9999; +} + +/* + - Header +*/ + +.um-admin-dash-head-logo { + float: left; + margin: 20px 10px; +} + +.um-admin-dash-head h2 { + color: #fff; + font-size: 24px !important; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background: url(../img/logo-header.png) no-repeat left 8px; + padding: 10px 10px 10px 80px; + margin: 0 !important; + display: inline-block; + font-style: normal; + padding-right: 5px; + line-height: 29px; +} + +.um-admin-dash-head span { + color: #fff !important; + font-size: 14px; + position: relative; + top: -10px; + font-weight: 600; + padding-left: 4px; +} + +/* + - Nav +*/ + +.um-admin-dash-nav a { + font-family: Open Sans; + font-size: 13px; + position: relative; + display: block; + padding: 10px 4px 10px 14px; + background: none repeat scroll 0px 0px transparent; + border-width: 1px 0px; + border-style: solid; + border-bottom: 1px solid #E7E7E7; + border-top: 0px none; + opacity: 0.7; + color: #555; + font-weight: 700; + text-decoration: none; + transition: none 0s ease 0s; +} + +.um-admin-dash-nav-title { + padding-left: 30px; +} + +.um-admin-dash-nav a:hover { + color: #777; + opacity: 1; + background: none repeat scroll 0px 0px #e5e5e5; +} + +.um-admin-dash-nav a i{ + vertical-align: middle; + font-size: 1.35em; + position: absolute; + color: #555; +} + +/* + - Misc +*/ + +.um-admin-dash-count { + background: #7ACE5A; + color: #fff; + padding: 2px 6px; + border-radius: 3px; + font-family: Open Sans; + font-weight: 700; + position: absolute; + right: 10px; + top: 8px; + font-size: 11px; +} + +.um-admin-dash-count.red {background:#cb3838} + +/* + - Main +*/ + +.um-admin-dash-main h3{ + color: #888; + font-weight: 500; + border-bottom: 1px solid #eee; + padding: 0 0 10px 0; + margin-bottom: 0 !important; +} \ No newline at end of file diff --git a/admin/assets/css/um-admin-form.css b/admin/assets/css/um-admin-form.css new file mode 100644 index 00000000..7a2dba68 --- /dev/null +++ b/admin/assets/css/um-admin-form.css @@ -0,0 +1,56 @@ +/* + - General +*/ + +.um-admin-metabox * { + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale !important; +} + +/* + - Metabox layout +*/ + +.um-admin.post-type-um_form div#submitdiv, +.um-admin.post-type-um_form div#side-sortables +{display:none} + +/* + - Boxed Links +*/ + +.um-admin-boxed-links { + width: 100%; + text-align: center; +} + +.um-admin-boxed-links a { + width: 33.3%; + float: left; + border-left: 1px solid #fff; + border-right: 1px solid #fff; + padding: 30px 25px !important; + background: #f8f8f8; + text-align: center; + display: inline-block !important; + font-size: 14px; + transition: all .2s linear; + text-decoration: none; + color: #666; + margin: 0 !important; + box-sizing: border-box !important; + border-radius: 2px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: 600; +} + +.um-admin-boxed-links i { + font-size: 28px; + vertical-align: middle; + margin: 0 10px 0 0; +} + +.um-admin-boxed-links a:hover { + background: #eee; +} \ No newline at end of file diff --git a/admin/assets/css/um-admin-global.css b/admin/assets/css/um-admin-global.css new file mode 100644 index 00000000..37d2458a --- /dev/null +++ b/admin/assets/css/um-admin-global.css @@ -0,0 +1,98 @@ +/* + - General metabox styling +*/ + +#um-admin-access-control h3 { + padding: 10px 20px 10px 60px; + color: #fff; + background: #3ba1da url(../img/logo-small.png) no-repeat 12px center; + font-weight: bold; + font-size: 14px !important; + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale !important; +} + +#um-admin-access-control h4 {margin:10px 0 4px 0!important} + +#um-admin-access-control div.handlediv { + color: #fff !important; + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale !important; +} + +#um-admin-access-control * {vertical-align: middle} + +#um-admin-access-control p {font-size: 13px} + +#um-admin-access-control input[type=text] {font-size: 13px} + +/* + - Nav Menu +*/ + +.um-nav-edit * { + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale !important; +} + +.um-nav-edit-h2 { + padding: 10px 20px 10px 60px; + margin: 14px 12px 0 0; + border-radius: 3px; + color: #fff; + background: #3ba1da url(../img/logo-small.png) no-repeat 12px center; + font-weight: bold; +} + +.um-nav-mode {margin-top:10px} +.um-nav-roles {display: none;margin-top:5px} + +/* + - Admin notice +*/ + +.um-admin-notice { + font-size: 14px !important; + color: #fff; + border-radius: 0; + margin: 40px 30px 0 0; + padding: 20px; + background: #3ba1da url(../img/logo-header.png) no-repeat 20px center; + border-radius: 5px; +} + +.um-admin-notice div { + padding: 0 0 0 80px; +} + +.um-admin-notice a { + text-decoration: none; + color: #3ba1da; + background: #fff; + margin: 0 0 0 10px; + border-radius: 5px; + display: inline-block; + padding: 8px 15px; +} +.um-admin-notice a:hover {color:#356e8e} + +.um-admin-notice a.um-admin-notice-alt { + background: #356e8e; + color: #8bbbd5; +} +.um-admin-notice a.um-admin-notice-alt:hover {color: #fff} + +/* + - jQuery Tooltips +*/ + +.um-admin-tip { + margin: 0 0 0 2px; + color: #3ba1da !important; + vertical-align: middle; + position: relative; + top: -3px; + opacity: 0.8; +} +.um-admin-tip.n {margin-left: 5px} +.um-admin-tip i {cursor: pointer; vertical-align: middle; font-size: 20px; line-height: 20px;color: #3ba1da !important;} \ No newline at end of file diff --git a/admin/assets/css/um-admin-menu.css b/admin/assets/css/um-admin-menu.css new file mode 100644 index 00000000..3c8c8d14 --- /dev/null +++ b/admin/assets/css/um-admin-menu.css @@ -0,0 +1,3 @@ +ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after {display: none !important} + +ul#adminmenu li.wp-has-submenu.wp-not-current-submenu:hover:after{right:-9999999px} \ No newline at end of file diff --git a/admin/assets/css/um-admin-misc.css b/admin/assets/css/um-admin-misc.css new file mode 100644 index 00000000..48d22ab8 --- /dev/null +++ b/admin/assets/css/um-admin-misc.css @@ -0,0 +1,304 @@ +/* + - Columns +*/ + +body.um-admin-modal-open { + overflow: hidden; +} + +.um-admin #major-publishing-actions{background-color: #fff !important;border-top:0} + +.um-admin .postbox h3 { +background: #f9f9f9; +} +.um-admin .postbox h3 i { + font-size: 1.3em !important; + vertical-align: middle !important; + margin: 0 10px 0 0; + line-height: 16px !important; + height: 16px !important; + position: relative; + top: 1px; + color: #3ba1da; +} + +.um-admin-hide {display: none} + +.um-admin-field { + display: block; + width: 100%; + margin-top: 10px; +} + +.um-admin-field a.button { + position: relative; + top: 1px; + height: 29px !important; +} + +.um-admin-half { + float: left; + width: 48%; +} + +.um-admin-tri { + float: left; + width: 33%; +} + +.um-admin-left{float: left} +.um-admin-right {float: right} +.um-admin-clear {clear: both} + +.um-admin a.um-admin-activebg, +.um-admin a.um-admin-activebg:hover{ + background: #3ba1da; + color: #fff; +} + +.um-admin a.button, +.um-admin input.button { + background: #f9f9f9 !important; + box-shadow: none !important; + color: #777; + border-radius: 2px; +} + +.um-admin a.button i, +.um-admin a.button-primary i { + font-size: 15px !important; + height: 15px !important; + vertical-align: middle !important; + margin: 0 5px 0 0 !important; +} + +.um-admin a.button i:before, +.um-admin a.button-primary i:before { + position: relative; + top: 1px; +} + +.um-admin a.button-primary, +.um-admin input.button-primary { + background: #3ba1da !important; + box-shadow: none !important; + border-radius: 2px; + color: #fff; +} +.um-admin a.button-primary:hover, +.um-admin input.button-primary:hover {background: #44b0ec !important;} + +/* + - Form Inputs +*/ + +.um-admin-metabox p {margin: 10px 0 0 0} + +.um-admin-metabox label{ + display: block; + cursor: default; + margin: 0 0 8px 0 !important; + padding: 0!important; + font-size: 13px; + color: #888; +} + +.um-admin-metabox input[type=text]:disabled{ + opacity: 0.7 !important; + color: #aaa !important; +} + +.um-admin-metabox input[type=text], +.um-admin-metabox textarea{ + width: 100%; + max-width: 100%; + display: block; + color: #666 !important; + background: #fff; + border: 1px solid #ddd; + border-radius: 2px; + outline: none !important; + box-sizing: border-box !important; + box-shadow: none !important; + + font-size: 13px !important; + height: auto !important; + line-height: 1.4em !important; + padding: 4px 10px !important; +} + +.um-admin-metabox input[type=text].um-admin-error, +.um-admin-metabox textarea.um-admin-error +{border-color: #C74A4A!important} + +.um-admin-metabox input[type=text]:focus, +.um-admin-metabox textarea:focus{ + border-color: #ccc; + background-color: #fff !important; +} + +.um-admin-metabox input[type=text].small {width: 50px} + +.um-admin-metabox textarea {min-height: 100px;height: 100px} + +.wp-picker-container input.wp-color-picker[type="text"] { + width: 68px !important; + float: left !important; + padding: 2px 4px !important; + border-width: 1px !important; +} + +/* + - Error blocks +*/ + +.um-admin-error-block, .um-admin-success-block{ + display: none; + width: 100%; + background: #C74A4A; + border-radius: 3px; + color: #fff; + box-sizing: border-box; + position: relative; + padding: 12px; + font-size: 13px; + line-height: 1em !important; + margin: 0 0 16px 0; +} + +.um-admin-success-block { + background: #7ACE5A; +} + +/* + - Yes or NO UI +*/ + +p.disabled-on-off .um-admin-yesno { + opacity: 0.5!important; + cursor: default !important; +} +p.disabled-on-off .um-admin-yesno *{ + cursor: default !important; +} + +.um-admin-yesno { + border-radius: 3px; + width: 120px; + height: 26px; + background: #aaa; + display: block; + color: #fff; + position: relative; +} + +.um-admin-yesno span.btn { + position: absolute; + left: 0; + top: 0; + width: 60px; + height: 26px; + text-align: center; + background: #f9f9f9; + z-index: 101; + border-radius: 1px; + cursor: pointer; + border: solid 1px #cccccc; +} + +.um-admin-yesno span.btn.pos-1 {left: 60px} + +.um-admin-yesno span.btn i { + position: relative; + top: 4px; + font-size: 18px; + line-height: 18px !important; + color: #B1B1B1; +} + +.um-admin-yesno span.yes, .um-admin-yesno span.no { + width: 60px; + float: left; + line-height: 28px; + height: 28px; + text-align: right; + cursor: default; + font-size: 13px; + color: #fff; + text-align: center; +} + +.um-admin-yesno span.no {float: right} +.um-admin-yesno .yes {background: #7ACE5A;border-radius: 3px 0 0 3px;} +.um-admin-yesno .no {background: #cb3838;border-radius: 0 3px 3px 0} + +/* + - SelectJS +*/ + +body.um-admin .actions, +body.um-admin .bulkactions { + float: left; + margin: 0!important; + padding:0!important; + top: 0!important; +} + +body.um-admin .actions .button { + height: 29px !important; + margin: 0 12px 0 0 !important; + display: inline !important; + position: relative; +} + +body.um-admin .select2-container {margin-right: 2px!important;} + +body.um-admin .select2-drop, +body.um-admin .select2-drop.select2-drop-above, +body.um-admin .select2-drop-active, +body.um-admin .select2-container-multi .select2-choices +{border: 1px solid #ddd !important} + +body.um-admin .select2-container .select2-choice +{ + height: 27px !important; + line-height: 27px !important; + border: 1px solid #ddd !important; + color: #888 !important; +} + +body.um-admin .select2-container .select2-choice { + font-size: 13px !important; +} + +body.um-admin .select2-container .select2-choice .select2-arrow:before { + font-size: 25px !important; +} + +body.um-admin .select2-search-choice-close:before { + font-size: 15px !important; + color: #aaa; +} + +body.um-admin .select2-container-multi .select2-search-choice-close:before { + font-size: 13px !important; +} + +body.um-admin .select2-search input[type=text] { + font-size: 13px !important; +} + +body.um-admin .select2-results li { + font-size: 13px !important; +} + +body.um-admin .select2-results .select2-no-results, +body.um-admin .select2-results .select2-searching, +body.um-admin .select2-results .select2-selection-limit { + font-size: 13px !important; +} + +body.um-admin .select2-container-multi .select2-choices .select2-search-choice { + line-height: 13px !important; + font-size: 13px !important; +} \ No newline at end of file diff --git a/admin/assets/css/um-admin-modal.css b/admin/assets/css/um-admin-modal.css new file mode 100644 index 00000000..9ed26661 --- /dev/null +++ b/admin/assets/css/um-admin-modal.css @@ -0,0 +1,259 @@ +/* + - Overlay +*/ + +.um-admin-overlay { + background: rgba(0,0,0, .7); + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 100000; +} + +/* + - modal +*/ + +.um-admin-modal * { + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale; +} + +.um-admin-modal input[type=submit].button-primary, +.um-admin-modal a.button-primary, +.um-admin-modal a.button { + padding: 0 12px !important; + vertical-align: middle !important; +} + +.um-admin-modal input[type=submit].button-primary { + line-height: 24px !important; +} + +.um-admin-modal { + border-radius: 3px; + background: #fff; + box-shadow: 0 4px 10px #111; + position: fixed; + top: 50% !important; + left: 50% !important; + display: none; + z-index: 100010; + box-sizing: border-box; + + width: 730px; + margin-left: -365px; +} + +.um-admin-modal.normal {width: 730px;margin-left: -365px;} +.um-admin-modal.smaller {width: 500px;margin-left: -250px;} +.um-admin-modal.small {width: 400px;margin-left: -200px;} + +.um-admin-modal-close { + position: absolute; + color: #fff !important; + right: 16px; + top: 13px; + font-size: 22px; + text-decoration: none; + opacity: 0.4; +} +.um-admin-modal-close:hover{opacity:1} + +.um-admin-modal-head { + padding: 4px 20px; + background: #3ba1da; + position: relative; + border-radius: 3px 3px 0 0; +} + +.um-admin-modal-body { + padding: 20px 20px 10px 20px; + max-height: 500px; + overflow: auto; +} + +.um-admin-modal-body.um-admin-metabox label {margin: 0!important} + +.um-admin-modal.loading .um-admin-modal-body { + height: 200px; + background: url(../img/ajax-loader.gif) no-repeat center; +} + +.um-admin-modal-foot { + padding: 20px 0 !important; + border-top: 1px solid #ddd; + text-align: center; + background: #eee; + border-radius: 0 0 3px 3px; +} + +.um-admin-modal-foot a, +.um-admin-modal-foot input{ + margin: 0 10px !important; + font-size: 14px !important; +} + +.um-admin-modal h3 { + font-size: 14px; + line-height: 14px; + font-weight: normal; + color: #fff; +} + +.um-admin-modal h4 { + margin: 0 0 10px 0 !important; +} + +.um-admin-modal label, +.um-admin-modal p { + font-size: 13px; + color: #aaa; +} + +/* + - Conditional fields +*/ + +.um-admin-btn-toggle { + padding: 10px 0; +} + +.um-admin-btn-toggle a { + text-decoration: none; + color: #999; +} + +.um-admin-btn-toggle a.active, .um-admin-btn-toggle a.active:hover { + color: #3ba1da; +} + +.um-admin-btn-toggle i { + vertical-align: middle !important; + margin: 0 5px 0 0 !important; + height: 100%; + color: #666; +} + +.um-admin-btn-content { + display: none; + padding: 10px 0 0 0; +} + +.um-admin-btn-content p { + float: left; + margin-right: 10px !important; + padding: 0 !important; +} + +.dynamic-mce-content {display: none} + +/* + - Buttons and Links +*/ + +.um-admin-btns { + line-height: 1.5em; + margin: 0 0 5px 0; +} + +.um-admin-btns a { + margin: 0 3px 8px 0!important; + font-size: 12px !important; + display: inline-block !important; + position: relative; +} + +.um-admin-btns a.button.with-icon { + padding-right: 25px !important; +} +.um-admin-btns a span { + color: #bbb; + position: absolute !important; + width: 25px; + text-align: center; + right: 0; + top: 0; + font-size: 15px !important; +} + +.um-admin-btns a span.remove:before{ + font-family: "ultimatemember" !important; + content: "\e483"; +} +.um-admin-btns a span:hover{color: #cb3838} + +/* + - WP Editor +*/ + +.um-admin-modal-body.um-admin-metabox .um-admin-editor-h label, +.um-admin-modal-body.um-admin-metabox .wp-editor-wrap +{margin: 0 0 10px 0 !important} + +.um-admin-modal-body.um-admin-metabox .wp-editor-wrap textarea { + border: 0 !important; +} + +/* + - Boxes / Icons +*/ + +#UM_fonticons div.um-admin-metabox { + padding-bottom: 22px !important; +} + +p._icon_search{ + position: relative; + width: 85% !important; + margin: 0 auto !important; + padding: 12px 0 0 0 !important; +} + +p._icon_search:before { + position: absolute; + right: 6px; + top: 13px; + font-size: 18px; + content: "\ebe1"; + font-family: "ultimatemember"; + color: #aaa; +} +p._icon_search input[type=text]{padding-right: 40px!important} + +.um-admin-icons { + padding: 0 0 15px 12px; + float: left; +} + +.um-admin-icons span { + cursor: pointer; + float: left; + margin: 5px; + color: #bbb; + border: 4px solid #eee; + border-radius: 3px; +} +.um-admin-icons span:hover, +.um-admin-icons span.highlighted +{color: #3ba1da;border-color: #3ba1da} + +.um-admin-icons i{vertical-align: middle !important;font-size: 24px;padding: 15px 20px;display: inline-block;} + +span.um-admin-icon-value { + margin: 0 10px; + font-size: 13px; +} +span.um-admin-icon-value i {font-size: 28px;vertical-align: middle;} + +span.um-admin-icon-clear{ + display: none; + cursor: pointer; + position: relative; + color: #ccc; +} +span.um-admin-icon-clear.show {display: inline-block} +span.um-admin-icon-clear:hover {color: #777} +span.um-admin-icon-clear i {font-size: 20px;vertical-align: middle;} \ No newline at end of file diff --git a/admin/assets/css/um-admin-redux.css b/admin/assets/css/um-admin-redux.css new file mode 100644 index 00000000..32bbac04 --- /dev/null +++ b/admin/assets/css/um-admin-redux.css @@ -0,0 +1,157 @@ +/* + - ReduxPanel +*/ + +.redux-container { + border-radius: 0 !important; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background: none !important; + box-shadow: none !important; + border: 0 !important; +} + +.redux-sidebar .redux-group-menu li.active a, .redux-sidebar .redux-group-menu li.active a:hover, .redux-sidebar .redux-group-menu li.activeChild a, .redux-sidebar .redux-group-menu li.activeChild a:hover { + background: transparent; +} + +.redux-container #info_bar { + display: none; +} + +.redux-sidebar .redux-group-menu { + font-size: 14px; +} + +.redux-sidebar .redux-group-menu li.active a, .admin-color-fresh .redux-sidebar .redux-group-menu li.activeChild a { + color: #3ba1da !important; +} + +.redux-sidebar .redux-group-menu li.activeChild.hasSubSections a { + color: #fff !important; +} + +.redux-container .redux_field_th { + font-size: 14px; + font-weight: 600; + color: #222; +} + +.redux-main { + background: none !important; +} + +#redux-header { + background: #3ba1da !important; + border-color: #3ba1da !important; + border-radius: 0 !important; + padding: 0 0 0 20px !important; + border-bottom: 0 !important; +} + +#redux-header .display_header span { + color: #fff !important; + font-size: 14px; + position: relative; + top: -10px; + font-weight: 600; + padding-left: 4px; +} + +#redux-header h2 { + color: #fff; + font-size: 24px !important; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background: url(../img/logo-header.png) no-repeat left 8px; + padding: 10px 10px 10px 80px; +} + +#redux-share {margin-top: 11px !important} + +#redux-share a { + color: #777 !important; + font-size: 22px !important; + margin: 0 15px 0 0 !important; +} +#redux-share a:hover {color: #3ba1da !important} + +.redux-main .form-table tr { + border-bottom: 0; +} + +.redux-container #redux-footer { + border-radius: 0; + background: none !important; + padding: 10px 0; + border-top: 1px solid #D8D8D8; +} + +.redux-container #redux-footer .redux-action_bar { + padding-top: 9px !important; +} + +.redux-container textarea, .redux-container input[type=text], .redux-container ul.data-full li { + font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; + font-size: 13px; + line-height: 19px; + color: #333; +} + +.redux-container ul.data-full{padding:0!important;margin:0!important} + +.redux-container .description { + color: #666 !important; + font-size: 14px !important; + font-style: italic !important; + margin-top: 10px !important; +} + +.redux-container .redux-group-tab h3 { + border-bottom: 0; +} + +.redux-container-switch {font-size: 13px} + +.redux-sidebar .redux-group-menu li a { + color: #555; + opacity: 1 !important; + padding: 10px 4px 10px 14px; +} + +.redux-sidebar .redux-group-menu li a:hover { + background: #ddd; + color: #555; +} + +.redux-sidebar .redux-group-menu li.activeChild.hasSubSections a { + background: #3ba1da !important; +} + +.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active { + border-right: 0; +} + +.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li { + border-right: 1px solid #DEDEDE; +} + +.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a { + background: transparent !important; + color: #555 !important; + border-bottom: 1px solid #E7E7E7; + padding: 10px 4px 10px 14px !important; +} + +.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li a:hover { + background: #ddd !important; +} + +.redux-sidebar .redux-group-menu li.activeChild.hasSubSections ul.subsection li.active a { + background: #555 !important; + color: #fff !important; +} + +.redux-sidebar .redux-group-menu li.activeChild.hasSubSections .active a:after { + border: none !important; +} \ No newline at end of file diff --git a/admin/assets/img/1-column-active.gif b/admin/assets/img/1-column-active.gif new file mode 100644 index 00000000..2f60b393 Binary files /dev/null and b/admin/assets/img/1-column-active.gif differ diff --git a/admin/assets/img/1-column.gif b/admin/assets/img/1-column.gif new file mode 100644 index 00000000..d9be98c6 Binary files /dev/null and b/admin/assets/img/1-column.gif differ diff --git a/admin/assets/img/2-columns-active.gif b/admin/assets/img/2-columns-active.gif new file mode 100644 index 00000000..f7dd37f4 Binary files /dev/null and b/admin/assets/img/2-columns-active.gif differ diff --git a/admin/assets/img/2-columns.gif b/admin/assets/img/2-columns.gif new file mode 100644 index 00000000..5617a33a Binary files /dev/null and b/admin/assets/img/2-columns.gif differ diff --git a/admin/assets/img/3-columns-active.gif b/admin/assets/img/3-columns-active.gif new file mode 100644 index 00000000..47126dc5 Binary files /dev/null and b/admin/assets/img/3-columns-active.gif differ diff --git a/admin/assets/img/3-columns.gif b/admin/assets/img/3-columns.gif new file mode 100644 index 00000000..11db5513 Binary files /dev/null and b/admin/assets/img/3-columns.gif differ diff --git a/admin/assets/img/ajax-loader.gif b/admin/assets/img/ajax-loader.gif new file mode 100644 index 00000000..1455a255 Binary files /dev/null and b/admin/assets/img/ajax-loader.gif differ diff --git a/admin/assets/img/logo-header.png b/admin/assets/img/logo-header.png new file mode 100644 index 00000000..10d690c0 Binary files /dev/null and b/admin/assets/img/logo-header.png differ diff --git a/admin/assets/img/logo-small.png b/admin/assets/img/logo-small.png new file mode 100644 index 00000000..26634685 Binary files /dev/null and b/admin/assets/img/logo-small.png differ diff --git a/admin/assets/js/um-admin-ajax.js b/admin/assets/js/um-admin-ajax.js new file mode 100644 index 00000000..e990f420 --- /dev/null +++ b/admin/assets/js/um-admin-ajax.js @@ -0,0 +1,53 @@ +jQuery(document).ready(function() { + + jQuery(document).ajaxStart(function(){ + jQuery('.tipsy').hide(); + }); + + jQuery(document).on('click', 'a[data-silent_action^="um_"]',function(){ + + in_row = ''; + in_sub_row = ''; + in_column = ''; + in_group = ''; + + if ( jQuery('.um-col-demon-settings').data('in_column') ) { + in_row = jQuery('.um-col-demon-settings').data('in_row'); + in_sub_row = jQuery('.um-col-demon-settings').data('in_sub_row'); + in_column = jQuery('.um-col-demon-settings').data('in_column'); + in_group = jQuery('.um-col-demon-settings').data('in_group'); + } + + act_id = jQuery(this).data('silent_action'); + arg1 = jQuery(this).data('arg1'); + arg2 = jQuery(this).data('arg2'); + + jQuery('.tipsy').hide(); + + um_admin_remove_modal(); + + jQuery.ajax({ + url: ultimatemember_ajax_url, + type: 'POST', + data: {action: 'ultimatemember_do_ajax_action', act_id : act_id, arg1 : arg1, arg2 : arg2, in_row: in_row, in_sub_row: in_sub_row, in_column: in_column, in_group: in_group }, + success: function(data){ + + jQuery('.um-col-demon-settings').data('in_row', ''); + jQuery('.um-col-demon-settings').data('in_sub_row', ''); + jQuery('.um-col-demon-settings').data('in_column', ''); + jQuery('.um-col-demon-settings').data('in_group', ''); + + um_admin_modal_responsive(); + um_admin_update_builder(); + + }, + error: function(data){ + + } + }); + + return false; + + }); + +}); \ No newline at end of file diff --git a/admin/assets/js/um-admin-builder.js b/admin/assets/js/um-admin-builder.js new file mode 100644 index 00000000..5d7c22fc --- /dev/null +++ b/admin/assets/js/um-admin-builder.js @@ -0,0 +1,42 @@ +/** + This function updates the + builder area with fields +**/ + +function um_admin_update_builder(){ + + form_id = jQuery('.um-admin-builder').data('form_id'); + + jQuery('.tipsy').hide(); + + jQuery.ajax({ + url: ultimatemember_ajax_url, + type: 'POST', + data: {action: 'update_builder', form_id: form_id }, + success: function(data){ + + jQuery('.um-admin-drag-ajax').html(data); + + jQuery('.tipsy').hide(); + + /* trigger columns at start */ + allow_update_via_col_click = false; + jQuery('.um-admin-drag-ctrls.columns a.active').each(function(){ + jQuery(this).trigger('click'); + }).promise().done( function(){ allow_update_via_col_click = true; } ); + + UM_Rows_Refresh(); + + }, + error: function(data){ + + } + }); + + return false; + +} + +jQuery(document).ready(function() { + +}); \ No newline at end of file diff --git a/admin/assets/js/um-admin-dragdrop.js b/admin/assets/js/um-admin-dragdrop.js new file mode 100644 index 00000000..79631006 --- /dev/null +++ b/admin/assets/js/um-admin-dragdrop.js @@ -0,0 +1,388 @@ +function UM_Drag_and_Drop(){ + + jQuery('.um-admin-drag-col,.um-admin-drag-group').sortable({ + items: '.um-admin-drag-fld', + connectWith: '.um-admin-drag-col,.um-admin-drag-group', + placeholder: "um-fld-placeholder", + forcePlaceholderSize:true, + update: function(event, ui){ + + if ( ui.item.hasClass('um-field-type-group') && ui.item.parents('.um-field-type-group').length > 0 ) { + jQuery('.um-admin-drag-col,.um-admin-drag-group').sortable('cancel'); + } else { + UM_Change_Field_Col(); + + UM_Change_Field_Grp(); + + UM_Rows_Refresh(); + } + + } + }); + + jQuery('.um-admin-drag-rowsubs').sortable({ + items: '.um-admin-drag-rowsub', + placeholder: "um-rowsub-placeholder", + forcePlaceholderSize:true, + zIndex: 9999999999, + update: function(){ + + UM_update_subrows(); + + UM_Rows_Refresh(); + + } + }).disableSelection(); + + jQuery('.um-admin-drag-rowsub').sortable({ + items: '.um-admin-drag-col', + zIndex: 9999999999, + update: function(){ + + row = jQuery(this); + row.find('.um-admin-drag-col').removeClass('cols-1 cols-2 cols-3 cols-last cols-middle'); + row.find('.um-admin-drag-col').addClass('cols-' + row.find('.um-admin-drag-col').length ); + row.find('.um-admin-drag-col:last').addClass('cols-last'); + if ( row.find('.um-admin-drag-col').length == 3 ) {row.find('.um-admin-drag-col:eq(1)').addClass('cols-middle');} + + UM_Change_Field_Col(); + + UM_Change_Field_Grp(); + + UM_Rows_Refresh(); + + } + }).disableSelection(); + + jQuery('.um-admin-drag-ajax').sortable({ + items: '.um-admin-drag-row', + handle: ".um-admin-drag-row-start", + zIndex: 9999999999, + placeholder: "um-row-placeholder", + forcePlaceholderSize:true, + out: function(){ + jQuery('.tipsy').remove(); + }, + update: function(){ + + UM_update_rows(); + + UM_Change_Field_Col(); + + UM_Change_Field_Grp(); + + UM_Rows_Refresh(); + + } + }).disableSelection(); + +} + +function UM_update_rows(){ + var c = 0; + jQuery('a[data-remove_element="um-admin-drag-row"]').remove(); + jQuery('.um-admin-drag-row').each(function(){ + c++; + row = jQuery(this); + if ( c != 1 ) { + row.find('.um-admin-drag-row-icons').append( '' ); + } + }); +} + +function UM_update_subrows(){ + jQuery('a[data-remove_element="um-admin-drag-rowsub"]').remove(); + jQuery('.um-admin-drag-row').each(function(){ + c = 0; + jQuery(this).find('.um-admin-drag-rowsub').each(function(){ + c++; + row = jQuery(this); + if ( c != 1 ) { + row.find('.um-admin-drag-rowsub-icons').append( '' ); + } + }); + }); +} + +function UM_Change_Field_Col(){ + jQuery('.um-admin-drag-col .um-admin-drag-fld').each(function(){ + cols = jQuery(this).parents('.um-admin-drag-rowsub').find('.um-admin-drag-col').length; + col = jQuery(this).parents('.um-admin-drag-col'); + if ( col.hasClass('cols-last') ) { + if ( cols == 1 ) { + saved_col = 1; + } + if ( cols == 3 ) { + saved_col = 3; + } else if ( cols == 2 ) { + saved_col = 2; + } + } else if ( col.hasClass('cols-middle') && cols == 3 ) { + saved_col = 2; + } else { + saved_col = 1; + } + + jQuery(this).data('column', saved_col); + }); +} + +function UM_Change_Field_Grp(){ + jQuery('.um-admin-drag-col .um-admin-drag-fld:not(.um-field-type-group)').each(function(){ + if ( jQuery(this).parents('.um-admin-drag-group').length == 0 ){ + jQuery(this).data('group', ''); + } else { + jQuery(this).data('group', jQuery(this).parents('.um-admin-drag-fld.um-field-type-group').data('key') ); + } + }); +} + +function UM_Rows_Refresh(){ + + jQuery('.um_update_order_fields').empty(); + + /* ROWS */ + var c = 0; + jQuery('.um-admin-drag-row').each(function(){ + c++; + + row = jQuery(this); + + col_num = ''; + row.find('.um-admin-drag-rowsub').each(function(){ + + subrow = jQuery(this); + + subrow.find('.um-admin-drag-col').removeClass('cols-1 cols-2 cols-3 cols-last cols-middle'); + subrow.find('.um-admin-drag-col').addClass('cols-' + subrow.find('.um-admin-drag-col').length ); + subrow.find('.um-admin-drag-col:last').addClass('cols-last'); + if ( subrow.find('.um-admin-drag-col').length == 3 ) {subrow.find('.um-admin-drag-col:eq(1)').addClass('cols-middle');} + + if ( !col_num ) { + col_num = subrow.find('.um-admin-drag-col').length; + } else { + col_num = col_num + ':' + subrow.find('.um-admin-drag-col').length; + } + + }); + + jQuery('.um_update_order_fields').append(''); + + sub_rows_count = row.find('.um-admin-drag-rowsub').length; + + jQuery('.um_update_order_fields').append(''); + jQuery('.um_update_order_fields').append(''); + + }); + + /* FIELDS */ + jQuery('.um-admin-drag-col .um-admin-drag-fld').each(function(){ + + if ( !jQuery(this).hasClass('group') ) { + var group = jQuery(this).data('group'); + if ( group != '' ) { + if ( jQuery('.um-admin-drag-fld.um-field-type-group.' + group ).find('.um-admin-drag-group').find( jQuery(this) ).length == 0 ) { + jQuery(this).appendTo( jQuery('.um-admin-drag-fld.um-field-type-group.' + group ).find('.um-admin-drag-group') ); + } else { + //jQuery(this).prependTo( jQuery('.um-admin-drag-fld.um-field-type-group.' + group ).find('.um-admin-drag-group') ); + } + jQuery('.um_update_order_fields').append(''); + } else { + jQuery('.um_update_order_fields').append(''); + } + } + + order = jQuery(this).index()+1; + + row = jQuery(this).parents('.um-admin-drag-row').index()+1; + row = '_um_row_'+row; + + saved_col = jQuery(this).data('column'); + + if ( saved_col == 3 ){ + jQuery(this).appendTo( jQuery(this).parents('.um-admin-drag-rowsub').find('.um-admin-drag-col:eq(2)') ); + } + if ( saved_col == 2 ){ + jQuery(this).appendTo( jQuery(this).parents('.um-admin-drag-rowsub').find('.um-admin-drag-col:eq(1)') ); + } + + sub_row = jQuery(this).parents('.um-admin-drag-rowsub').index(); + + jQuery('.um_update_order_fields').append(''); + + jQuery('.um_update_order_fields').append(''); + + jQuery('.um_update_order_fields').append(''); + + jQuery('.um_update_order_fields').append(''); + + }); + + UM_Drag_and_Drop(); + + UM_Add_Icon(); + + jQuery.ajax({ + url: ultimatemember_ajax_url, + type: 'POST', + data: jQuery('.um_update_order').serialize(), + success: function(){ + + } + }); + +} + +function UM_Add_Icon(){ + + var add_icon_html = ''; + + jQuery('.um-admin-drag-col').each(function(){ + if ( jQuery(this).find('.um-admin-drag-add-field').length == 0 ) { + jQuery(this).append(add_icon_html); + } else { + jQuery(this).find('.um-admin-drag-add-field').remove(); + jQuery(this).append(add_icon_html); + } + }); + + jQuery('.um-admin-drag-group').each(function(){ + if ( jQuery(this).find('.um-admin-drag-add-field').length == 0 ) { + jQuery(this).append(add_icon_html); + } else { + jQuery(this).find('.um-admin-drag-add-field').remove(); + jQuery(this).append(add_icon_html); + } + }); + +} + +jQuery(document).ready(function() { + + if ( !jQuery('.um-admin-drag').length ) return false; + + UM_Drag_and_Drop(); + + /* add field to respected area */ + jQuery(document).on('click', 'a.um-admin-drag-add-field', function(){ + in_row = jQuery(this).parents('.um-admin-drag-row').index(); + in_sub_row = jQuery(this).parents('.um-admin-drag-rowsub').index(); + if ( jQuery(this).parents('.um-admin-drag-rowsub').find('.um-admin-drag-col').length == 1 ) { + in_column = 1; + } else { + if ( jQuery(this).parents('.um-admin-drag-col').hasClass('cols-middle')){ + in_column = 2; + } else if ( jQuery(this).parents('.um-admin-drag-col').hasClass('cols-last') ) { + if ( jQuery(this).parents('.um-admin-drag-rowsub').find('.um-admin-drag-col').length == 3 ) { + in_column = 3; + } else { + in_column = 2; + } + } else { + in_column = 1; + } + } + + if ( jQuery(this).parents('.um-admin-drag-group').length ) { + in_group = jQuery(this).parents('.um-admin-drag-fld.um-field-type-group').data('key'); + } else { + in_group = ''; + } + + jQuery('.um-col-demon-settings').data('in_row', in_row); + jQuery('.um-col-demon-settings').data('in_sub_row', in_sub_row); + jQuery('.um-col-demon-settings').data('in_column', in_column); + jQuery('.um-col-demon-settings').data('in_group', in_group); + }); + + /* add row */ + jQuery(document).on('click', '*[data-row_action="add_row"]', function(){ + var dragg = jQuery('.um-admin-drag-ajax'); + dragg.append( '
..., stripping HTML..."); } + this.data = this.data.replace(/<(?:.|\s)*?>/g, ''); //Aggressively strip HTML. + } + // Test if what remains is JSON or JSONp + var json_regex = /^\s*([\[\{].*[\}\]])\s*$/; // Ghetto, but it works + var jsonp_regex = /^[\s\u200B\uFEFF]*([\w$\[\]\.]+)[\s\u200B\uFEFF]*\([\s\u200B\uFEFF]*([\[{][\s\S]*[\]}])[\s\u200B\uFEFF]*\);?[\s\u200B\uFEFF]*$/; + var jsonp_regex2 = /([\[\{][\s\S]*[\]\}])\)/; // more liberal support... this allows us to pass the jsonp.json & jsonp2.json tests + var is_json = json_regex.test(this.data); + var is_jsonp = jsonp_regex.test(this.data); + if (this.debug) { console.log("JSONView: is_json=" + is_json + " is_jsonp=" + is_jsonp); } + if (is_json || is_jsonp) { + if (this.debug) { console.log("JSONView: sexytime!"); } + // JSONFormatter json->HTML prototype straight from Firefox JSONView + // For reference: http://code.google.com/p/jsonview + + function JSONFormatter() { + // No magic required. + } + JSONFormatter.prototype = { + htmlEncode: function(t) { + return t != null ? t.toString().replace(/&/g, "&").replace(/"/g, """).replace(//g, ">") : ''; + }, + decorateWithSpan: function(value, className) { + return '' + this.htmlEncode(value) + ''; + }, + // Convert a basic JSON datatype (number, string, boolean, null, object, array) into an HTML fragment. + valueToHTML: function(value) { + var valueType = typeof value; + var output = ""; + if (value === null) { + output += this.decorateWithSpan('null', 'null'); + } else if (value && value.constructor === Array) { + output += this.arrayToHTML(value); + } else if (valueType === 'object') { + output += this.objectToHTML(value); + } else if (valueType === 'number') { + output += this.decorateWithSpan(value, 'num'); + } else if (valueType === 'string') { + if (/^(http|https):\/\/[^\s]+$/.test(value)) { + output += '' + this.htmlEncode(value) + ''; + } else { + output += this.decorateWithSpan('"' + value + '"', 'string'); + } + } else if (valueType === 'boolean') { + output += this.decorateWithSpan(value, 'bool'); + } + return output; + }, + // Convert an array into an HTML fragment + arrayToHTML: function(json) { + var output = '[
..., stripping HTML..."),this.data=this.data.replace(/<(?:.|\s)*?>/g,""));var n=/^\s*([\[\{].*[\}\]])\s*$/,r=/^[\s\u200B\uFEFF]*([\w$\[\]\.]+)[\s\u200B\uFEFF]*\([\s\u200B\uFEFF]*([\[{][\s\S]*[\]}])[\s\u200B\uFEFF]*\);?[\s\u200B\uFEFF]*$/,i=/([\[\{][\s\S]*[\]\}])\)/,s=n.test(this.data),o=r.test(this.data);this.debug&&console.log("JSONView: is_json="+s+" is_jsonp="+o);if(s||o){this.debug&&console.log("JSONView: sexytime!");function u(){}u.prototype={htmlEncode:function(e){return e!=null?e.toString().replace(/&/g,"&").replace(/"/g,""").replace(//g,">"):""},decorateWithSpan:function(e,t){return''+this.htmlEncode(e)+""},valueToHTML:function(e){var t=typeof e,n="";return e===null?n+=this.decorateWithSpan("null","null"):e&&e.constructor===Array?n+=this.arrayToHTML(e):t==="object"?n+=this.objectToHTML(e):t==="number"?n+=this.decorateWithSpan(e,"num"):t==="string"?/^(http|https):\/\/[^\s]+$/.test(e)?n+=''+this.htmlEncode(e)+"":n+=this.decorateWithSpan('"'+e+'"',"string"):t==="boolean"&&(n+=this.decorateWithSpan(e,"bool")),n},arrayToHTML:function(e){var t='[
"; + print_r( $wpdb->queries ); + echo ""; + } + + echo '
"; + print_r($value); + echo ""; + */ + + /** + * filter 'redux-field-{opt_name}' + * + * @deprecated + * + * @param string rendered field markup + * @param array $field field data + */ + $_render = apply_filters( "redux-field-{$this->args['opt_name']}", ob_get_contents(), $field ); // REMOVE + + /** + * filter 'redux/field/{opt_name}/{field.type}/render/after' + * + * @param string rendered field markup + * @param array $field field data + */ + $_render = apply_filters( "redux/field/{$this->args['opt_name']}/{$field['type']}/render/after", $_render, $field ); + + /** + * filter 'redux/field/{opt_name}/render/after' + * + * @param string rendered field markup + * @param array $field field data + */ + $_render = apply_filters( "redux/field/{$this->args['opt_name']}/render/after", $_render, $field ); + + ob_end_clean(); + + //save the values into a unique array in case we need it for dependencies + $this->fieldsValues[ $field['id'] ] = ( isset( $value['url'] ) && is_array( $value ) ) ? $value['url'] : $value; + + //create default data und class string and checks the dependencies of an object + $class_string = ''; + $data_string = ''; + + $this->check_dependencies( $field ); + + /** + * action 'redux/field/{opt_name}/{field.type}/fieldset/before/{opt_name}' + * + * @param array $field field data + * @param string $value field id + */ + do_action( "redux/field/{$this->args['opt_name']}/{$field['type']}/fieldset/before/{$this->args['opt_name']}", $field, $value ); + + /** + * action 'redux/field/{opt_name}/fieldset/before/{opt_name}' + * + * @param array $field field data + * @param string $value field id + */ + do_action( "redux/field/{$this->args['opt_name']}/fieldset/before/{$this->args['opt_name']}", $field, $value ); + + if ( ! isset( $field['fields'] ) || empty( $field['fields'] ) ) { + echo ''; + } + + /** + * action 'redux-after-field-{opt_name}' + * + * @deprecated + * + * @param array $field field data + * @param string $value field id + */ + do_action( "redux-after-field-{$this->args['opt_name']}", $field, $value ); // REMOVE + + /** + * action 'redux/field/{opt_name}/{field.type}/fieldset/after/{opt_name}' + * + * @param array $field field data + * @param string $value field id + */ + do_action( "redux/field/{$this->args['opt_name']}/{$field['type']}/fieldset/after/{$this->args['opt_name']}", $field, $value ); + + /** + * action 'redux/field/{opt_name}/fieldset/after/{opt_name}' + * + * @param array $field field data + * @param string $value field id + */ + do_action( "redux/field/{$this->args['opt_name']}/fieldset/after/{$this->args['opt_name']}", $field, $value ); + } + } + } // _field_input() + + /** + * Can Output CSS + * Check if a field meets its requirements before outputting to CSS + * + * @param $field + * + * @return bool + */ + public function _can_output_css( $field ) { + $return = true; + + $field = apply_filters( "redux/field/{$this->args['opt_name']}/_can_output_css", $field ); + if ( isset( $field['force_output'] ) && $field['force_output'] == true ) { + return $return; + } + + if ( ! empty( $field['required'] ) ) { + if ( isset( $field['required'][0] ) ) { + if ( ! is_array( $field['required'][0] ) && count( $field['required'] ) == 3 ) { + $parentValue = $GLOBALS[ $this->args['global_variable'] ][ $field['required'][0] ]; + $checkValue = $field['required'][2]; + $operation = $field['required'][1]; + $return = $this->compareValueDependencies( $parentValue, $checkValue, $operation ); + } else if ( is_array( $field['required'][0] ) ) { + foreach ( $field['required'] as $required ) { + if ( ! is_array( $required[0] ) && count( $required ) == 3 ) { + $parentValue = $GLOBALS[ $this->args['global_variable'] ][ $required[0] ]; + $checkValue = $required[2]; + $operation = $required[1]; + $return = $this->compareValueDependencies( $parentValue, $checkValue, $operation ); + } + if ( ! $return ) { + return $return; + } + } + } + } + } + + return $return; + } // _can_output_css + + /** + * Checks dependencies between objects based on the $field['required'] array + * If the array is set it needs to have exactly 3 entries. + * The first entry describes which field should be monitored by the current field. eg: "content" + * The second entry describes the comparison parameter. eg: "equals, not, is_larger, is_smaller ,contains" + * The third entry describes the value that we are comparing against. + * Example: if the required array is set to array('content','equals','Hello World'); then the current + * field will only be displayed if the field with id "content" has exactly the value "Hello World" + * + * @param array $field + * + * @return array $params + */ + private function check_dependencies( $field ) { + //$params = array('data_string' => "", 'class_string' => ""); + + if ( ! empty( $field['required'] ) ) { + + //$this->folds[$field['id']] = $this->folds[$field['id']] ? $this->folds[$field['id']] : array(); + if ( ! isset( $this->required_child[ $field['id'] ] ) ) { + $this->required_child[ $field['id'] ] = array(); + } + + if ( ! isset( $this->required[ $field['id'] ] ) ) { + $this->required[ $field['id'] ] = array(); + } + + if ( is_array( $field['required'][0] ) ) { + foreach ( $field['required'] as $value ) { + if ( is_array( $value ) && count( $value ) == 3 ) { + $data = array(); + $data['parent'] = $value[0]; + $data['operation'] = $value[1]; + $data['checkValue'] = $value[2]; + + $this->required[ $data['parent'] ][ $field['id'] ][] = $data; + + if ( ! in_array( $data['parent'], $this->required_child[ $field['id'] ] ) ) { + $this->required_child[ $field['id'] ][] = $data; + } + + $this->checkRequiredDependencies( $field, $data ); + } + } + } else { + $data = array(); + $data['parent'] = $field['required'][0]; + $data['operation'] = $field['required'][1]; + $data['checkValue'] = $field['required'][2]; + + $this->required[ $data['parent'] ][ $field['id'] ][] = $data; + + if ( ! in_array( $data['parent'], $this->required_child[ $field['id'] ] ) ) { + $this->required_child[ $field['id'] ][] = $data; + } + + $this->checkRequiredDependencies( $field, $data ); + } + + } + //return $params; + } + + // Compare data for required field + private function compareValueDependencies( $parentValue, $checkValue, $operation ) { + $return = false; + + switch ( $operation ) { + case '=': + case 'equals': + $data['operation'] = "="; + if ( is_array( $checkValue ) ) { + if ( in_array( $parentValue, $checkValue ) ) { + $return = true; + } + } else { + if ( $parentValue == $checkValue ) { + $return = true; + } else if ( is_array( $parentValue ) ) { + if ( in_array( $checkValue, $parentValue ) ) { + $return = true; + } + } + } + break; + case '!=': + case 'not': + $data['operation'] = "!=="; + if ( is_array( $checkValue ) ) { + if ( ! in_array( $parentValue, $checkValue ) ) { + $return = true; + } + } else { + if ( $parentValue != $checkValue ) { + $return = true; + } else if ( is_array( $parentValue ) ) { + if ( ! in_array( $checkValue, $parentValue ) ) { + $return = true; + } + } + } + break; + case '>': + case 'greater': + case 'is_larger': + $data['operation'] = ">"; + if ( $parentValue > $checkValue ) { + $return = true; + } + break; + case '>=': + case 'greater_equal': + case 'is_larger_equal': + $data['operation'] = ">="; + if ( $parentValue >= $checkValue ) { + $return = true; + } + break; + case '<': + case 'less': + case 'is_smaller': + $data['operation'] = "<"; + if ( $parentValue < $checkValue ) { + $return = true; + } + break; + case '<=': + case 'less_equal': + case 'is_smaller_equal': + $data['operation'] = "<="; + if ( $parentValue <= $checkValue ) { + $return = true; + } + break; + case 'contains': + if ( strpos( $parentValue, $checkValue ) !== false ) { + $return = true; + } + break; + case 'doesnt_contain': + case 'not_contain': + if ( strpos( $parentValue, $checkValue ) === false ) { + $return = true; + } + break; + case 'is_empty_or': + if ( empty( $parentValue ) || $parentValue == $checkValue ) { + $return = true; + } + break; + case 'not_empty_and': + if ( ! empty( $parentValue ) && $parentValue != $checkValue ) { + $return = true; + } + break; + case 'is_empty': + case 'empty': + case '!isset': + if ( empty( $parentValue ) || $parentValue == "" || $parentValue == null ) { + $return = true; + } + break; + case 'not_empty': + case '!empty': + case 'isset': + if ( ! empty( $parentValue ) && $parentValue != "" && $parentValue != null ) { + $return = true; + } + break; + } + + return $return; + } + + private function checkRequiredDependencies( $field, $data ) { + //required field must not be hidden. otherwise hide this one by default + + if ( ! in_array( $data['parent'], $this->fieldsHidden ) && ( ! isset( $this->folds[ $field['id'] ] ) || $this->folds[ $field['id'] ] != "hide" ) ) { + if ( isset( $this->options[ $data['parent'] ] ) ) { + $return = $this->compareValueDependencies( $this->options[ $data['parent'] ], $data['checkValue'], $data['operation'] ); + } + } + + if ( ( isset( $return ) && $return ) && ( ! isset( $this->folds[ $field['id'] ] ) || $this->folds[ $field['id'] ] != "hide" ) ) { + $this->folds[ $field['id'] ] = "show"; + } else { + $this->folds[ $field['id'] ] = "hide"; + if ( ! in_array( $field['id'], $this->fieldsHidden ) ) { + $this->fieldsHidden[] = $field['id']; + } + } + } + + /** + * converts an array into a html data string + * + * @param array $data example input: array('id'=>'true') + * + * @return string $data_string example output: data-id='true' + */ + public function create_data_string( $data = array() ) { + $data_string = ""; + + foreach ( $data as $key => $value ) { + if ( is_array( $value ) ) { + $value = implode( "|", $value ); + } + $data_string .= " data-$key='$value' "; + } + + return $data_string; + } + + public function admin_page(){ + + $page = $_REQUEST['page']; + + if ( $page == 'ultimatemember') + + include_once um_path . 'admin/templates/dashboard.php'; + + } + + } // ReduxFramework + + /** + * action 'redux/init' + * + * @param null + */ + do_action( 'redux/init', ReduxFramework::init() ); + + } // class_exists('ReduxFramework') diff --git a/admin/core/lib/ReduxFramework/ReduxCore/inc/browser.php b/admin/core/lib/ReduxFramework/ReduxCore/inc/browser.php new file mode 100644 index 00000000..99e9b695 --- /dev/null +++ b/admin/core/lib/ReduxFramework/ReduxCore/inc/browser.php @@ -0,0 +1,1195 @@ +getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >= 2 ) { + * echo 'You have Firefox version 2 or greater'; + * } + * User agents sampled from: http://www.useragentstring.com/ + * Based on original work from Gary White (http://apptools.com/phptools/browser/ + * CHANGELOG: + * 2012-12-26 (v1.9c by Chris Christoff): + * + Changed vars to publics + * 2012-12-23 (v1.9b by Chris Christoff): + * + Removed the browser string return and added spacing. + * + Also removed return HTML formatting. + * 2012-12-23 (v1.9a by Chris Christoff): + * + Split user string and add formatting so we can print a nicely + * formatted user agent string + * 2010-08-20 (v1.9): + * + Added MSN Explorer Browser (legacy) + * + Added Bing/MSN Robot (Thanks Rob MacDonald) + * + Added the Android Platform (PLATFORM_ANDROID) + * + Fixed issue with Android 1.6/2.2 (Thanks Tom Hirashima) + * 2010-04-27 (v1.8): + * + Added iPad Support + * 2010-03-07 (v1.7): + * + *MAJOR* Rebuild (preg_match and other "slow" routine removal(s)) + * + Almost allof Gary's original code has been replaced + * + Large PHPUNIT testing environment created to validate new releases and additions + * + Added FreeBSD Platform + * + Added OpenBSD Platform + * + Added NetBSD Platform + * + Added SunOS Platform + * + Added OpenSolaris Platform + * + Added support of the Iceweazel Browser + * + Added isChromeFrame() call to check if chromeframe is in use + * + Moved the Opera check in front of the Firefox check due to legacy Opera User Agents + * + Added the __toString() method (Thanks Deano) + * 2009-11-15: + * + Updated the checkes for Firefox + * + Added the NOKIA platform + * + Added Checks for the NOKIA brower(s) + * 2009-11-08: + * + PHP 5.3 Support + * + Added support for BlackBerry OS and BlackBerry browser + * + Added support for the Opera Mini browser + * + Added additional documenation + * + Added support for isRobot() and isMobile() + * + Added support for Opera version 10 + * + Added support for deprecated Netscape Navigator version 9 + * + Added support for IceCat + * + Added support for Shiretoko + * 2010-04-27 (v1.8): + * + Added iPad Support + * 2009-08-18: + * + Updated to support PHP 5.3 - removed all deprecated function calls + * + Updated to remove all double quotes (") -- converted to single quotes (') + * 2009-04-27: + * + Updated the IE check to remove a typo and bug (thanks John) + * 2009-04-22: + * + Added detection for GoogleBot + * + Added detection for the W3C Validator. + * + Added detection for Yahoo! Slurp + * 2009-03-14: + * + Added detection for iPods. + * + Added Platform detection for iPhones + * + Added Platform detection for iPods + * 2009-02-16: (Rick Hale) + * + Added version detection for Android phones. + * 2008-12-09: + * + Removed unused constant + * 2008-11-07: + * + Added Google's Chrome to the detection list + * + Added isBrowser(string) to the list of functions special thanks to + * Daniel 'mavrick' Lang for the function concept (http://mavrick.id.au) + * Gary White noted: "Since browser detection is so unreliable, I am + * no longer maintaining this script. You are free to use and or + * modify/update it as you want, however the author assumes no + * responsibility for the accuracy of the detected values." + * Anyone experienced with Gary's script might be interested in these notes: + * Added class constants + * Added detection and version detection for Google's Chrome + * Updated the version detection for Amaya + * Updated the version detection for Firefox + * Updated the version detection for Lynx + * Updated the version detection for WebTV + * Updated the version detection for NetPositive + * Updated the version detection for IE + * Updated the version detection for OmniWeb + * Updated the version detection for iCab + * Updated the version detection for Safari + * Updated Safari to remove mobile devices (iPhone) + * Added detection for iPhone + * Added detection for robots + * Added detection for mobile devices + * Added detection for BlackBerry + * Removed Netscape checks (matches heavily with firefox & mozilla) + */ + + + // Exit if accessed directly + if ( ! defined( 'ABSPATH' ) ) { + exit; + } + + if ( ! class_exists( 'Browser' ) ) { + + /** + * Browser detection class + * + * @author Chris Schuld + * @since 1.0 + */ + class Browser { + public $_agent = ''; + public $_browser_name = ''; + public $_version = ''; + public $_platform = ''; + public $_os = ''; + public $_is_aol = false; + public $_is_mobile = false; + public $_is_robot = false; + public $_aol_version = ''; + + public $BROWSER_UNKNOWN = 'unknown'; + public $VERSION_UNKNOWN = 'unknown'; + + public $BROWSER_OPERA = 'Opera'; // Http://www.opera.com/ + public $BROWSER_OPERA_MINI = 'Opera Mini'; // Http://www.opera.com/mini/ + public $BROWSER_WEBTV = 'WebTV'; // Http://www.webtv.net/pc/ + public $BROWSER_IE = 'Internet Explorer'; // Http://www.microsoft.com/ie/ + public $BROWSER_POCKET_IE = 'Pocket Internet Explorer'; // Http://en.wikipedia.org/wiki/Internet_Explorer_Mobile + public $BROWSER_KONQUEROR = 'Konqueror'; // Http://www.konqueror.org/ + public $BROWSER_ICAB = 'iCab'; // Http://www.icab.de/ + public $BROWSER_OMNIWEB = 'OmniWeb'; // Http://www.omnigroup.com/applications/omniweb/ + public $BROWSER_FIREBIRD = 'Firebird'; // Http://www.ibphoenix.com/ + public $BROWSER_FIREFOX = 'Firefox'; // Http://www.mozilla.com/en-US/firefox/firefox.html + public $BROWSER_ICEWEASEL = 'Iceweasel'; // Http://www.geticeweasel.org/ + public $BROWSER_SHIRETOKO = 'Shiretoko'; // Http://wiki.mozilla.org/Projects/shiretoko + public $BROWSER_MOZILLA = 'Mozilla'; // Http://www.mozilla.com/en-US/ + public $BROWSER_AMAYA = 'Amaya'; // Http://www.w3.org/Amaya/ + public $BROWSER_LYNX = 'Lynx'; // Http://en.wikipedia.org/wiki/Lynx + public $BROWSER_SAFARI = 'Safari'; // Http://apple.com + public $BROWSER_IPHONE = 'iPhone'; // Http://apple.com + public $BROWSER_IPOD = 'iPod'; // Http://apple.com + public $BROWSER_IPAD = 'iPad'; // Http://apple.com + public $BROWSER_CHROME = 'Chrome'; // Http://www.google.com/chrome + public $BROWSER_ANDROID = 'Android'; // Http://www.android.com/ + public $BROWSER_GOOGLEBOT = 'GoogleBot'; // Http://en.wikipedia.org/wiki/Googlebot + public $BROWSER_SLURP = 'Yahoo! Slurp'; // Http://en.wikipedia.org/wiki/Yahoo!_Slurp + public $BROWSER_W3CVALIDATOR = 'W3C Validator'; // Http://validator.w3.org/ + public $BROWSER_BLACKBERRY = 'BlackBerry'; // Http://www.blackberry.com/ + public $BROWSER_ICECAT = 'IceCat'; // Http://en.wikipedia.org/wiki/GNU_IceCat + public $BROWSER_NOKIA_S60 = 'Nokia S60 OSS Browser'; // Http://en.wikipedia.org/wiki/Web_Browser_for_S60 + public $BROWSER_NOKIA = 'Nokia Browser'; // * all other WAP-based browsers on the Nokia Platform + public $BROWSER_MSN = 'MSN Browser'; // Http://explorer.msn.com/ + public $BROWSER_MSNBOT = 'MSN Bot'; // Http://search.msn.com/msnbot.htm + // Http://en.wikipedia.org/wiki/Msnbot (used for Bing as well) + + public $BROWSER_NETSCAPE_NAVIGATOR = 'Netscape Navigator'; // Http://browser.netscape.com/ (DEPRECATED) + public $BROWSER_GALEON = 'Galeon'; // Http://galeon.sourceforge.net/ (DEPRECATED) + public $BROWSER_NETPOSITIVE = 'NetPositive'; // Http://en.wikipedia.org/wiki/NetPositive (DEPRECATED) + public $BROWSER_PHOENIX = 'Phoenix'; // Http://en.wikipedia.org/wiki/History_of_Mozilla_Firefox (DEPRECATED) + + public $PLATFORM_UNKNOWN = 'unknown'; + public $PLATFORM_WINDOWS = 'Windows'; + public $PLATFORM_WINDOWS_CE = 'Windows CE'; + public $PLATFORM_APPLE = 'Apple'; + public $PLATFORM_LINUX = 'Linux'; + public $PLATFORM_OS2 = 'OS/2'; + public $PLATFORM_BEOS = 'BeOS'; + public $PLATFORM_IPHONE = 'iPhone'; + public $PLATFORM_IPOD = 'iPod'; + public $PLATFORM_IPAD = 'iPad'; + public $PLATFORM_BLACKBERRY = 'BlackBerry'; + public $PLATFORM_NOKIA = 'Nokia'; + public $PLATFORM_FREEBSD = 'FreeBSD'; + public $PLATFORM_OPENBSD = 'OpenBSD'; + public $PLATFORM_NETBSD = 'NetBSD'; + public $PLATFORM_SUNOS = 'SunOS'; + public $PLATFORM_OPENSOLARIS = 'OpenSolaris'; + public $PLATFORM_ANDROID = 'Android'; + + public $OPERATING_SYSTEM_UNKNOWN = 'unknown'; + + function Browser( $useragent = '' ) { + $this->reset(); + + if ( $useragent != '' ) { + $this->setUserAgent( $useragent ); + } else { + $this->determine(); + } + } + + /** + * Reset all properties + */ + function reset() { + $this->_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : ''; + $this->_browser_name = $this->BROWSER_UNKNOWN; + $this->_version = $this->VERSION_UNKNOWN; + $this->_platform = $this->PLATFORM_UNKNOWN; + $this->_os = $this->OPERATING_SYSTEM_UNKNOWN; + $this->_is_aol = false; + $this->_is_mobile = false; + $this->_is_robot = false; + $this->_aol_version = $this->VERSION_UNKNOWN; + } + + /** + * Check to see if the specific browser is valid + * + * @param string $browserName + * + * @return True if the browser is the specified browser + */ + function isBrowser( $browserName ) { + return ( 0 == strcasecmp( $this->_browser_name, trim( $browserName ) ) ); + } + + /** + * The name of the browser. All return types are from the class contants + * + * @return string Name of the browser + */ + function getBrowser() { + return $this->_browser_name; + } + + /** + * Set the name of the browser + * + * @param $browser The name of the Browser + */ + function setBrowser( $browser ) { + return $this->_browser_name = $browser; + } + + /** + * The name of the platform. All return types are from the class contants + * + * @return string Name of the browser + */ + function getPlatform() { + return $this->_platform; + } + + /** + * Set the name of the platform + * + * @param $platform The name of the Platform + */ + function setPlatform( $platform ) { + return $this->_platform = $platform; + } + + /** + * The version of the browser. + * + * @return string Version of the browser (will only contain alpha-numeric characters and a period) + */ + function getVersion() { + return $this->_version; + } + + /** + * Set the version of the browser + * + * @param $version The version of the Browser + */ + function setVersion( $version ) { + $this->_version = preg_replace( '/[^0-9,.,a-z,A-Z-]/', '', $version ); + } + + /** + * The version of AOL. + * + * @return string Version of AOL (will only contain alpha-numeric characters and a period) + */ + function getAolVersion() { + return $this->_aol_version; + } + + /** + * Set the version of AOL + * + * @param $version The version of AOL + */ + function setAolVersion( $version ) { + $this->_aol_version = preg_replace( '/[^0-9,.,a-z,A-Z]/', '', $version ); + } + + /** + * Is the browser from AOL? + * + * @return boolean True if the browser is from AOL otherwise false + */ + function isAol() { + return $this->_is_aol; + } + + /** + * Is the browser from a mobile device? + * + * @return boolean True if the browser is from a mobile device otherwise false + */ + function isMobile() { + return $this->_is_mobile; + } + + /** + * Is the browser from a robot (ex Slurp,GoogleBot)? + * + * @return boolean True if the browser is from a robot otherwise false + */ + function isRobot() { + return $this->_is_robot; + } + + /** + * Set the browser to be from AOL + * + * @param $isAol + */ + function setAol( $isAol ) { + $this->_is_aol = $isAol; + } + + /** + * Set the Browser to be mobile + * + * @param boolean $value is the browser a mobile brower or not + */ + function setMobile( $value = true ) { + $this->_is_mobile = $value; + } + + /** + * Set the Browser to be a robot + * + * @param boolean $value is the browser a robot or not + */ + function setRobot( $value = true ) { + $this->_is_robot = $value; + } + + /** + * Get the user agent value in use to determine the browser + * + * @return string The user agent from the HTTP header + */ + function getUserAgent() { + return $this->_agent; + } + + /** + * Set the user agent value (the construction will use the HTTP header value - this will overwrite it) + * + * @param $agent_string The value for the User Agent + */ + function setUserAgent( $agent_string ) { + $this->reset(); + $this->_agent = $agent_string; + $this->determine(); + } + + /** + * Used to determine if the browser is actually "chromeframe" + * + * @since 1.7 + * @return boolean True if the browser is using chromeframe + */ + function isChromeFrame() { + return ( strpos( $this->_agent, 'chromeframe' ) !== false ); + } + + /** + * Returns a formatted string with a summary of the details of the browser. + * + * @return string formatted string with a summary of the browser + */ + function __toString() { + $text1 = $this->getUserAgent(); // Grabs the UA string + $UAline1 = substr( $text1, 0, 32 ); // The first line we print should only be the first 32 characters of the UA string + $text2 = $this->getUserAgent(); // Now we grab it again and save it to a string + $towrapUA = str_replace( $UAline1, '', $text2 ); // The rest of the printoff (other than first line) is equivalent + // to the whole string minus the part we printed off. IE + // User Agent: thefirst32charactersfromUAline1 + // the rest of it is now stored in + // $text2 to be printed off + // But we need to add spaces before each line that is split other than line 1 + $space = ''; + for ( $i = 0; $i < 25; $i ++ ) { + $space .= ' '; + } + + // Now we split the remaining string of UA ($text2) into lines that are prefixed by spaces for formatting + $wordwrapped = chunk_split( $towrapUA, 32, "\n $space" ); + + return "Platform: {$this->getPlatform()} \n" . + "Browser Name: {$this->getBrowser()} \n" . + "Browser Version: {$this->getVersion()} \n" . + "User Agent String: $UAline1 \n\t\t\t " . + "$wordwrapped"; + } + + /** + * Protected routine to calculate and determine what the browser is in use (including platform) + */ + function determine() { + $this->checkPlatform(); + $this->checkBrowsers(); + $this->checkForAol(); + } + + /** + * Protected routine to determine the browser type + * + * @return boolean True if the browser was detected otherwise false + */ + function checkBrowsers() { + return ( + // Well-known, well-used + // Special Notes: + // (1) Opera must be checked before FireFox due to the odd + // user agents used in some older versions of Opera + // (2) WebTV is strapped onto Internet Explorer so we must + // check for WebTV before IE + // (3) (deprecated) Galeon is based on Firefox and needs to be + // tested before Firefox is tested + // (4) OmniWeb is based on Safari so OmniWeb check must occur + // before Safari + // (5) Netscape 9+ is based on Firefox so Netscape checks + // before FireFox are necessary + $this->checkBrowserWebTv() || + $this->checkBrowserInternetExplorer() || + $this->checkBrowserOpera() || + $this->checkBrowserGaleon() || + $this->checkBrowserNetscapeNavigator9Plus() || + $this->checkBrowserFirefox() || + $this->checkBrowserChrome() || + $this->checkBrowserOmniWeb() || + + // Common mobile + $this->checkBrowserAndroid() || + $this->checkBrowseriPad() || + $this->checkBrowseriPod() || + $this->checkBrowseriPhone() || + $this->checkBrowserBlackBerry() || + $this->checkBrowserNokia() || + + // Common bots + $this->checkBrowserGoogleBot() || + $this->checkBrowserMSNBot() || + $this->checkBrowserSlurp() || + + // WebKit base check (post mobile and others) + $this->checkBrowserSafari() || + + // Everyone else + $this->checkBrowserNetPositive() || + $this->checkBrowserFirebird() || + $this->checkBrowserKonqueror() || + $this->checkBrowserIcab() || + $this->checkBrowserPhoenix() || + $this->checkBrowserAmaya() || + $this->checkBrowserLynx() || + + $this->checkBrowserShiretoko() || + $this->checkBrowserIceCat() || + $this->checkBrowserW3CValidator() || + $this->checkBrowserMozilla() /* Mozilla is such an open standard that you must check it last */ + ); + } + + /** + * Determine if the user is using a BlackBerry (last updated 1.7) + * + * @return boolean True if the browser is the BlackBerry browser otherwise false + */ + function checkBrowserBlackBerry() { + if ( stripos( $this->_agent, 'blackberry' ) !== false ) { + $aresult = explode( "/", stristr( $this->_agent, "BlackBerry" ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + $this->_browser_name = $this->BROWSER_BLACKBERRY; + $this->setMobile( true ); + + return true; + } + + return false; + } + + /** + * Determine if the user is using an AOL User Agent (last updated 1.7) + * + * @return boolean True if the browser is from AOL otherwise false + */ + function checkForAol() { + $this->setAol( false ); + $this->setAolVersion( $this->VERSION_UNKNOWN ); + + if ( stripos( $this->_agent, 'aol' ) !== false ) { + $aversion = explode( ' ', stristr( $this->_agent, 'AOL' ) ); + $this->setAol( true ); + $this->setAolVersion( preg_replace( '/[^0-9\.a-z]/i', '', $aversion[1] ) ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is the GoogleBot or not (last updated 1.7) + * + * @return boolean True if the browser is the GoogletBot otherwise false + */ + function checkBrowserGoogleBot() { + if ( stripos( $this->_agent, 'googlebot' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'googlebot' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( str_replace( ';', '', $aversion[0] ) ); + $this->_browser_name = $this->BROWSER_GOOGLEBOT; + $this->setRobot( true ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is the MSNBot or not (last updated 1.9) + * + * @return boolean True if the browser is the MSNBot otherwise false + */ + function checkBrowserMSNBot() { + if ( stripos( $this->_agent, "msnbot" ) !== false ) { + $aresult = explode( "/", stristr( $this->_agent, "msnbot" ) ); + $aversion = explode( " ", $aresult[1] ); + $this->setVersion( str_replace( ";", "", $aversion[0] ) ); + $this->_browser_name = $this->BROWSER_MSNBOT; + $this->setRobot( true ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is the W3C Validator or not (last updated 1.7) + * + * @return boolean True if the browser is the W3C Validator otherwise false + */ + function checkBrowserW3CValidator() { + if ( stripos( $this->_agent, 'W3C-checklink' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'W3C-checklink' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + $this->_browser_name = $this->BROWSER_W3CVALIDATOR; + + return true; + } else if ( stripos( $this->_agent, 'W3C_Validator' ) !== false ) { + // Some of the Validator versions do not delineate w/ a slash - add it back in + $ua = str_replace( "W3C_Validator ", "W3C_Validator/", $this->_agent ); + $aresult = explode( '/', stristr( $ua, 'W3C_Validator' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + $this->_browser_name = $this->BROWSER_W3CVALIDATOR; + + return true; + } + + return false; + } + + /** + * Determine if the browser is the Yahoo! Slurp Robot or not (last updated 1.7) + * + * @return boolean True if the browser is the Yahoo! Slurp Robot otherwise false + */ + function checkBrowserSlurp() { + if ( stripos( $this->_agent, 'slurp' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Slurp' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + $this->_browser_name = $this->BROWSER_SLURP; + $this->setRobot( true ); + $this->setMobile( false ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Internet Explorer or not (last updated 1.7) + * + * @return boolean True if the browser is Internet Explorer otherwise false + */ + function checkBrowserInternetExplorer() { + + // Test for v1 - v1.5 IE + if ( stripos( $this->_agent, 'microsoft internet explorer' ) !== false ) { + $this->setBrowser( $this->BROWSER_IE ); + $this->setVersion( '1.0' ); + $aresult = stristr( $this->_agent, '/' ); + if ( preg_match( '/308|425|426|474|0b1/i', $aresult ) ) { + $this->setVersion( '1.5' ); + } + + return true; + // Test for versions > 1.5 + } else if ( stripos( $this->_agent, 'msie' ) !== false && stripos( $this->_agent, 'opera' ) === false ) { + // See if the browser is the odd MSN Explorer + if ( stripos( $this->_agent, 'msnb' ) !== false ) { + $aresult = explode( ' ', stristr( str_replace( ';', '; ', $this->_agent ), 'MSN' ) ); + $this->setBrowser( $this->BROWSER_MSN ); + $this->setVersion( str_replace( array( '(', ')', ';' ), '', $aresult[1] ) ); + + return true; + } + $aresult = explode( ' ', stristr( str_replace( ';', '; ', $this->_agent ), 'msie' ) ); + $this->setBrowser( $this->BROWSER_IE ); + $this->setVersion( str_replace( array( '(', ')', ';' ), '', $aresult[1] ) ); + + return true; + // Test for Pocket IE + } else if ( stripos( $this->_agent, 'mspie' ) !== false || stripos( $this->_agent, 'pocket' ) !== false ) { + $aresult = explode( ' ', stristr( $this->_agent, 'mspie' ) ); + $this->setPlatform( $this->PLATFORM_WINDOWS_CE ); + $this->setBrowser( $this->BROWSER_POCKET_IE ); + $this->setMobile( true ); + + if ( stripos( $this->_agent, 'mspie' ) !== false ) { + $this->setVersion( $aresult[1] ); + } else { + $aversion = explode( '/', $this->_agent ); + $this->setVersion( $aversion[1] ); + } + + return true; + } + + return false; + } + + /** + * Determine if the browser is Opera or not (last updated 1.7) + * + * @return boolean True if the browser is Opera otherwise false + */ + function checkBrowserOpera() { + if ( stripos( $this->_agent, 'opera mini' ) !== false ) { + $resultant = stristr( $this->_agent, 'opera mini' ); + if ( preg_match( '/\//', $resultant ) ) { + $aresult = explode( '/', $resultant ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + } else { + $aversion = explode( ' ', stristr( $resultant, 'opera mini' ) ); + $this->setVersion( $aversion[1] ); + } + $this->_browser_name = $this->BROWSER_OPERA_MINI; + $this->setMobile( true ); + + return true; + } else if ( stripos( $this->_agent, 'opera' ) !== false ) { + $resultant = stristr( $this->_agent, 'opera' ); + if ( preg_match( '/Version\/(10.*)$/', $resultant, $matches ) ) { + $this->setVersion( $matches[1] ); + } else if ( preg_match( '/\//', $resultant ) ) { + $aresult = explode( '/', str_replace( "(", " ", $resultant ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + } else { + $aversion = explode( ' ', stristr( $resultant, 'opera' ) ); + $this->setVersion( isset( $aversion[1] ) ? $aversion[1] : "" ); + } + $this->_browser_name = $this->BROWSER_OPERA; + + return true; + } + + return false; + } + + /** + * Determine if the browser is Chrome or not (last updated 1.7) + * + * @return boolean True if the browser is Chrome otherwise false + */ + function checkBrowserChrome() { + if ( stripos( $this->_agent, 'Chrome' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Chrome' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + $this->setBrowser( $this->BROWSER_CHROME ); + + return true; + } + + return false; + } + + + /** + * Determine if the browser is WebTv or not (last updated 1.7) + * + * @return boolean True if the browser is WebTv otherwise false + */ + function checkBrowserWebTv() { + if ( stripos( $this->_agent, 'webtv' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'webtv' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + $this->setBrowser( $this->BROWSER_WEBTV ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is NetPositive or not (last updated 1.7) + * + * @return boolean True if the browser is NetPositive otherwise false + */ + function checkBrowserNetPositive() { + if ( stripos( $this->_agent, 'NetPositive' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'NetPositive' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( str_replace( array( '(', ')', ';' ), '', $aversion[0] ) ); + $this->setBrowser( $this->BROWSER_NETPOSITIVE ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Galeon or not (last updated 1.7) + * + * @return boolean True if the browser is Galeon otherwise false + */ + function checkBrowserGaleon() { + if ( stripos( $this->_agent, 'galeon' ) !== false ) { + $aresult = explode( ' ', stristr( $this->_agent, 'galeon' ) ); + $aversion = explode( '/', $aresult[0] ); + $this->setVersion( $aversion[1] ); + $this->setBrowser( $this->BROWSER_GALEON ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Konqueror or not (last updated 1.7) + * + * @return boolean True if the browser is Konqueror otherwise false + */ + function checkBrowserKonqueror() { + if ( stripos( $this->_agent, 'Konqueror' ) !== false ) { + $aresult = explode( ' ', stristr( $this->_agent, 'Konqueror' ) ); + $aversion = explode( '/', $aresult[0] ); + $this->setVersion( $aversion[1] ); + $this->setBrowser( $this->BROWSER_KONQUEROR ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is iCab or not (last updated 1.7) + * + * @return boolean True if the browser is iCab otherwise false + */ + function checkBrowserIcab() { + if ( stripos( $this->_agent, 'icab' ) !== false ) { + $aversion = explode( ' ', stristr( str_replace( '/', ' ', $this->_agent ), 'icab' ) ); + $this->setVersion( $aversion[1] ); + $this->setBrowser( $this->BROWSER_ICAB ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is OmniWeb or not (last updated 1.7) + * + * @return boolean True if the browser is OmniWeb otherwise false + */ + function checkBrowserOmniWeb() { + if ( stripos( $this->_agent, 'omniweb' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'omniweb' ) ); + $aversion = explode( ' ', isset( $aresult[1] ) ? $aresult[1] : "" ); + $this->setVersion( $aversion[0] ); + $this->setBrowser( $this->BROWSER_OMNIWEB ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Phoenix or not (last updated 1.7) + * + * @return boolean True if the browser is Phoenix otherwise false + */ + function checkBrowserPhoenix() { + if ( stripos( $this->_agent, 'Phoenix' ) !== false ) { + $aversion = explode( '/', stristr( $this->_agent, 'Phoenix' ) ); + $this->setVersion( $aversion[1] ); + $this->setBrowser( $this->BROWSER_PHOENIX ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Firebird or not (last updated 1.7) + * + * @return boolean True if the browser is Firebird otherwise false + */ + function checkBrowserFirebird() { + if ( stripos( $this->_agent, 'Firebird' ) !== false ) { + $aversion = explode( '/', stristr( $this->_agent, 'Firebird' ) ); + $this->setVersion( $aversion[1] ); + $this->setBrowser( $this->BROWSER_FIREBIRD ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Netscape Navigator 9+ or not (last updated 1.7) + * NOTE: (http://browser.netscape.com/ - Official support ended on March 1st, 2008) + * + * @return boolean True if the browser is Netscape Navigator 9+ otherwise false + */ + function checkBrowserNetscapeNavigator9Plus() { + if ( stripos( $this->_agent, 'Firefox' ) !== false && preg_match( '/Navigator\/([^ ]*)/i', $this->_agent, $matches ) ) { + $this->setVersion( $matches[1] ); + $this->setBrowser( $this->BROWSER_NETSCAPE_NAVIGATOR ); + + return true; + } else if ( stripos( $this->_agent, 'Firefox' ) === false && preg_match( '/Netscape6?\/([^ ]*)/i', $this->_agent, $matches ) ) { + $this->setVersion( $matches[1] ); + $this->setBrowser( $this->BROWSER_NETSCAPE_NAVIGATOR ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Shiretoko or not (https://wiki.mozilla.org/Projects/shiretoko) (last updated 1.7) + * + * @return boolean True if the browser is Shiretoko otherwise false + */ + function checkBrowserShiretoko() { + if ( stripos( $this->_agent, 'Mozilla' ) !== false && preg_match( '/Shiretoko\/([^ ]*)/i', $this->_agent, $matches ) ) { + $this->setVersion( $matches[1] ); + $this->setBrowser( $this->BROWSER_SHIRETOKO ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Ice Cat or not (http://en.wikipedia.org/wiki/GNU_IceCat) (last updated 1.7) + * + * @return boolean True if the browser is Ice Cat otherwise false + */ + function checkBrowserIceCat() { + if ( stripos( $this->_agent, 'Mozilla' ) !== false && preg_match( '/IceCat\/([^ ]*)/i', $this->_agent, $matches ) ) { + $this->setVersion( $matches[1] ); + $this->setBrowser( $this->BROWSER_ICECAT ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Nokia or not (last updated 1.7) + * + * @return boolean True if the browser is Nokia otherwise false + */ + function checkBrowserNokia() { + if ( preg_match( "/Nokia([^\/]+)\/([^ SP]+)/i", $this->_agent, $matches ) ) { + $this->setVersion( $matches[2] ); + if ( stripos( $this->_agent, 'Series60' ) !== false || strpos( $this->_agent, 'S60' ) !== false ) { + $this->setBrowser( $this->BROWSER_NOKIA_S60 ); + } else { + $this->setBrowser( $this->BROWSER_NOKIA ); + } + $this->setMobile( true ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Firefox or not (last updated 1.7) + * + * @return boolean True if the browser is Firefox otherwise false + */ + function checkBrowserFirefox() { + if ( stripos( $this->_agent, 'safari' ) === false ) { + if ( preg_match( "/Firefox[\/ \(]([^ ;\)]+)/i", $this->_agent, $matches ) ) { + $this->setVersion( $matches[1] ); + $this->setBrowser( $this->BROWSER_FIREFOX ); + + return true; + } else if ( preg_match( "/Firefox$/i", $this->_agent, $matches ) ) { + $this->setVersion( "" ); + $this->setBrowser( $this->BROWSER_FIREFOX ); + + return true; + } + } + + return false; + } + + /** + * Determine if the browser is Firefox or not (last updated 1.7) + * + * @return boolean True if the browser is Firefox otherwise false + */ + function checkBrowserIceweasel() { + if ( stripos( $this->_agent, 'Iceweasel' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Iceweasel' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + $this->setBrowser( $this->BROWSER_ICEWEASEL ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Mozilla or not (last updated 1.7) + * + * @return boolean True if the browser is Mozilla otherwise false + */ + function checkBrowserMozilla() { + if ( stripos( $this->_agent, 'mozilla' ) !== false && preg_match( '/rv:[0-9].[0-9][a-b]?/i', $this->_agent ) && stripos( $this->_agent, 'netscape' ) === false ) { + $aversion = explode( ' ', stristr( $this->_agent, 'rv:' ) ); + preg_match( '/rv:[0-9].[0-9][a-b]?/i', $this->_agent, $aversion ); + $this->setVersion( str_replace( 'rv:', '', $aversion[0] ) ); + $this->setBrowser( $this->BROWSER_MOZILLA ); + + return true; + } else if ( stripos( $this->_agent, 'mozilla' ) !== false && preg_match( '/rv:[0-9]\.[0-9]/i', $this->_agent ) && stripos( $this->_agent, 'netscape' ) === false ) { + $aversion = explode( '', stristr( $this->_agent, 'rv:' ) ); + $this->setVersion( str_replace( 'rv:', '', $aversion[0] ) ); + $this->setBrowser( $this->BROWSER_MOZILLA ); + + return true; + } else if ( stripos( $this->_agent, 'mozilla' ) !== false && preg_match( '/mozilla\/([^ ]*)/i', $this->_agent, $matches ) && stripos( $this->_agent, 'netscape' ) === false ) { + $this->setVersion( $matches[1] ); + $this->setBrowser( $this->BROWSER_MOZILLA ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Lynx or not (last updated 1.7) + * + * @return boolean True if the browser is Lynx otherwise false + */ + function checkBrowserLynx() { + if ( stripos( $this->_agent, 'lynx' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Lynx' ) ); + $aversion = explode( ' ', ( isset( $aresult[1] ) ? $aresult[1] : "" ) ); + $this->setVersion( $aversion[0] ); + $this->setBrowser( $this->BROWSER_LYNX ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Amaya or not (last updated 1.7) + * + * @return boolean True if the browser is Amaya otherwise false + */ + function checkBrowserAmaya() { + if ( stripos( $this->_agent, 'amaya' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Amaya' ) ); + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + $this->setBrowser( $this->BROWSER_AMAYA ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Safari or not (last updated 1.7) + * + * @return boolean True if the browser is Safari otherwise false + */ + function checkBrowserSafari() { + if ( stripos( $this->_agent, 'Safari' ) !== false && stripos( $this->_agent, 'iPhone' ) === false && stripos( $this->_agent, 'iPod' ) === false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Version' ) ); + if ( isset( $aresult[1] ) ) { + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + } else { + $this->setVersion( $this->VERSION_UNKNOWN ); + } + $this->setBrowser( $this->BROWSER_SAFARI ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is iPhone or not (last updated 1.7) + * + * @return boolean True if the browser is iPhone otherwise false + */ + function checkBrowseriPhone() { + if ( stripos( $this->_agent, 'iPhone' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Version' ) ); + if ( isset( $aresult[1] ) ) { + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + } else { + $this->setVersion( $this->VERSION_UNKNOWN ); + } + $this->setMobile( true ); + $this->setBrowser( $this->BROWSER_IPHONE ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is iPod or not (last updated 1.7) + * + * @return boolean True if the browser is iPod otherwise false + */ + function checkBrowseriPad() { + if ( stripos( $this->_agent, 'iPad' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Version' ) ); + if ( isset( $aresult[1] ) ) { + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + } else { + $this->setVersion( $this->VERSION_UNKNOWN ); + } + $this->setMobile( true ); + $this->setBrowser( $this->BROWSER_IPAD ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is iPod or not (last updated 1.7) + * + * @return boolean True if the browser is iPod otherwise false + */ + function checkBrowseriPod() { + if ( stripos( $this->_agent, 'iPod' ) !== false ) { + $aresult = explode( '/', stristr( $this->_agent, 'Version' ) ); + if ( isset( $aresult[1] ) ) { + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + } else { + $this->setVersion( $this->VERSION_UNKNOWN ); + } + $this->setMobile( true ); + $this->setBrowser( $this->BROWSER_IPOD ); + + return true; + } + + return false; + } + + /** + * Determine if the browser is Android or not (last updated 1.7) + * + * @return boolean True if the browser is Android otherwise false + */ + function checkBrowserAndroid() { + if ( stripos( $this->_agent, 'Android' ) !== false ) { + $aresult = explode( ' ', stristr( $this->_agent, 'Android' ) ); + if ( isset( $aresult[1] ) ) { + $aversion = explode( ' ', $aresult[1] ); + $this->setVersion( $aversion[0] ); + } else { + $this->setVersion( $this->VERSION_UNKNOWN ); + } + $this->setMobile( true ); + $this->setBrowser( $this->BROWSER_ANDROID ); + + return true; + } + + return false; + } + + /** + * Determine the user's platform (last updated 1.7) + */ + function checkPlatform() { + if ( stripos( $this->_agent, 'windows' ) !== false ) { + $this->_platform = $this->PLATFORM_WINDOWS; + } elseif ( stripos( $this->_agent, 'iPad' ) !== false ) { + $this->_platform = $this->PLATFORM_IPAD; + } elseif ( stripos( $this->_agent, 'iPod' ) !== false ) { + $this->_platform = $this->PLATFORM_IPOD; + } elseif ( stripos( $this->_agent, 'iPhone' ) !== false ) { + $this->_platform = $this->PLATFORM_IPHONE; + } elseif ( stripos( $this->_agent, 'mac' ) !== false ) { + $this->_platform = $this->PLATFORM_APPLE; + } elseif ( stripos( $this->_agent, 'android' ) !== false ) { + $this->_platform = $this->PLATFORM_ANDROID; + } elseif ( stripos( $this->_agent, 'linux' ) !== false ) { + $this->_platform = $this->PLATFORM_LINUX; + } elseif ( stripos( $this->_agent, 'Nokia' ) !== false ) { + $this->_platform = $this->PLATFORM_NOKIA; + } elseif ( stripos( $this->_agent, 'BlackBerry' ) !== false ) { + $this->_platform = $this->PLATFORM_BLACKBERRY; + } elseif ( stripos( $this->_agent, 'FreeBSD' ) !== false ) { + $this->_platform = $this->PLATFORM_FREEBSD; + } elseif ( stripos( $this->_agent, 'OpenBSD' ) !== false ) { + $this->_platform = $this->PLATFORM_OPENBSD; + } elseif ( stripos( $this->_agent, 'NetBSD' ) !== false ) { + $this->_platform = $this->PLATFORM_NETBSD; + } elseif ( stripos( $this->_agent, 'OpenSolaris' ) !== false ) { + $this->_platform = $this->PLATFORM_OPENSOLARIS; + } elseif ( stripos( $this->_agent, 'SunOS' ) !== false ) { + $this->_platform = $this->PLATFORM_SUNOS; + } elseif ( stripos( $this->_agent, 'OS\/2' ) !== false ) { + $this->_platform = $this->PLATFORM_OS2; + } elseif ( stripos( $this->_agent, 'BeOS' ) !== false ) { + $this->_platform = $this->PLATFORM_BEOS; + } elseif ( stripos( $this->_agent, 'win' ) !== false ) { + $this->_platform = $this->PLATFORM_WINDOWS; + } + } + } + } +?> diff --git a/admin/core/lib/ReduxFramework/ReduxCore/inc/class.p.php b/admin/core/lib/ReduxFramework/ReduxCore/inc/class.p.php new file mode 100644 index 00000000..bb182208 --- /dev/null +++ b/admin/core/lib/ReduxFramework/ReduxCore/inc/class.p.php @@ -0,0 +1,292 @@ + and
';
+ echo __( 'Unable to create a required directory. Please ensure that', 'redux-framework' );
+ echo ' ' . Redux_Helpers::cleanFilePath( trailingslashit( WP_CONTENT_DIR ) ) . '/uploads/ ';
+ echo __( 'has the proper read/write permissions or enter your FTP information below.', 'redux-framework' );
+ echo '
dev_mode on. Contact them to fix it, but in the meantime you can use our dev_mode disabler.' . $notice['msg'] . ' ' . __( 'Dismiss', 'redux-framework' ) . '.
' . $notice['msg'] . '.
Redux Framework', '', '' ); + ?> +
Redux directory. They may cause errors in Theme-Check.', 'redux-framework' );
+ echo '
value ); ?>+
\n ${1}\n\nsnippet body\n \n ${1}\n \nsnippet br\n
${1}\nsnippet col\n